paulbsd-salt/states/pycharm/init.sls

29 lines
1.0 KiB
Plaintext
Raw Normal View History

2020-07-10 00:58:55 +02:00
---
{%- from "pycharm/map.jinja" import pycharm with context %}
{%- if not salt['file.directory_exists'](pycharm.install_dir + '/pycharm-community-' + pycharm.version) %}
pycharm-archive-extract:
archive.extracted:
- source: {{ pycharm.mirror }}/pycharm-community-{{ pycharm.version }}.tar.gz
- source_hash: {{ pycharm.mirror }}/pycharm-community-{{ pycharm.version }}.tar.gz.sha256
- archive_format: tar
- name: {{ pycharm.install_dir }}
- if_missing: {{ pycharm.install_dir }}/pycharm-community-{{ pycharm.version }}
- watch:
- file: pycharm-link
- file: pycharm-shortcut
{%- endif %}
pycharm-link:
file.symlink:
- name: {{ pycharm.install_dir }}/pycharm
- target: {{ pycharm.install_dir }}/pycharm-community-{{ pycharm.version }}
- force: True
pycharm-shortcut:
file.managed:
- name: /usr/share/applications/jetbrains-pycharm-ce.desktop
- source: salt://pycharm/jetbrains-pycharm-ce.desktop.j2
- template: jinja
- user: root
- group: root
- mode: 644