updated arduino / pycharm states
This commit is contained in:
parent
c69475655f
commit
c4561519b3
@ -1,4 +1,5 @@
|
||||
---
|
||||
arduino:
|
||||
mirror: "https://downloads.arduino.cc"
|
||||
install_dir: "/usr/local/apps"
|
||||
mirror: https://downloads.arduino.cc
|
||||
install_dir: /usr/local/apps
|
||||
release_dir: /usr/local/apps/releases
|
@ -1,40 +1,3 @@
|
||||
---
|
||||
{%- from "arduino/map.jinja" import arduino with context %}
|
||||
{%- if not salt['file.directory_exists']( arduino.install_dir + '/arduino-' + arduino.version ) %}
|
||||
arduino-archive-extract:
|
||||
archive.extracted:
|
||||
- name: {{ arduino.install_dir }}
|
||||
- source: {{ arduino.mirror }}/arduino-{{ arduino.version }}-{{ arduino.arch }}.tar.xz
|
||||
- skip_verify: true
|
||||
- archive_format: tar
|
||||
- keep: true
|
||||
- if_missing: {{ arduino.install_dir }}/arduino-{{ arduino.version }}
|
||||
|
||||
arduino-symlink:
|
||||
file.symlink:
|
||||
- name: {{ arduino.install_dir }}/arduino
|
||||
- target: {{ arduino.install_dir }}/arduino-{{ arduino.version }}
|
||||
- force: true
|
||||
- onchanges:
|
||||
- arduino-archive-extract
|
||||
|
||||
arduino-bin-symlink:
|
||||
file.symlink:
|
||||
- name: /usr/bin/arduino
|
||||
- target: {{ arduino.install_dir }}/arduino-{{ arduino.version }}/arduino
|
||||
- force: true
|
||||
- onchanges:
|
||||
- arduino-archive-extract
|
||||
|
||||
arduino-shortcut:
|
||||
file.managed:
|
||||
- name: /usr/share/applications/arduino-arduinoide.desktop
|
||||
- source: salt://arduino/arduino-arduinoide.desktop.j2
|
||||
- template: jinja
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: 644
|
||||
- onchanges:
|
||||
- arduino-archive-extract
|
||||
- arduino-symlink
|
||||
{%- endif %}
|
||||
include:
|
||||
- .install
|
39
states/arduino/install.sls
Normal file
39
states/arduino/install.sls
Normal file
@ -0,0 +1,39 @@
|
||||
---
|
||||
{%- from "arduino/map.jinja" import arduino with context %}
|
||||
arduino-archive-extract:
|
||||
archive.extracted:
|
||||
- name: {{ arduino.release_dir }}
|
||||
- source: {{ arduino.mirror }}/arduino-{{ arduino.version }}-{{ arduino.arch }}.tar.xz
|
||||
- skip_verify: true
|
||||
- archive_format: tar
|
||||
- keep: true
|
||||
- if_missing: {{ arduino.release_dir }}/arduino-{{ arduino.version }}
|
||||
|
||||
arduino-symlink:
|
||||
file.symlink:
|
||||
- name: {{ arduino.install_dir }}/arduino
|
||||
- target: {{ arduino.release_dir }}/arduino-{{ arduino.version }}
|
||||
- force: true
|
||||
- onchanges:
|
||||
- arduino-archive-extract
|
||||
|
||||
arduino-bin-symlink:
|
||||
file.symlink:
|
||||
- name: /usr/bin/arduino
|
||||
- target: {{ arduino.install_dir }}/arduino-{{ arduino.version }}/arduino
|
||||
- force: true
|
||||
- onchanges:
|
||||
- arduino-archive-extract
|
||||
|
||||
arduino-shortcut:
|
||||
file.managed:
|
||||
- name: /usr/share/applications/arduino-arduinoide.desktop
|
||||
- source: salt://arduino/arduino-arduinoide.desktop.j2
|
||||
- template: jinja
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: 644
|
||||
- onchanges:
|
||||
- arduino-archive-extract
|
||||
- arduino-symlink
|
||||
|
@ -2,5 +2,6 @@
|
||||
pycharm:
|
||||
enabled: true
|
||||
install_dir: /usr/local/apps
|
||||
release_dir: /usr/local/apps/releases
|
||||
mirror: https://download.jetbrains.com/python
|
||||
config:
|
||||
config: {}
|
||||
|
@ -1,29 +1,3 @@
|
||||
---
|
||||
{%- 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
|
||||
include:
|
||||
- .install
|
28
states/pycharm/install.sls
Normal file
28
states/pycharm/install.sls
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
{%- from "pycharm/map.jinja" import pycharm with context %}
|
||||
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.release_dir }}
|
||||
- if_missing: {{ pycharm.release_dir }}/pycharm-community-{{ pycharm.version }}
|
||||
- watch:
|
||||
- file: pycharm-link
|
||||
- file: pycharm-shortcut
|
||||
|
||||
pycharm-link:
|
||||
file.symlink:
|
||||
- name: {{ pycharm.install_dir }}/pycharm
|
||||
- target: {{ pycharm.release_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
|
||||
|
Loading…
Reference in New Issue
Block a user