paulbsd-salt/states/arduino/install.sls
Paul Lecuq a3b02771a4
All checks were successful
continuous-integration/drone/push Build is passing
created templates folder on each state
2023-03-11 10:08:26 +01:00

45 lines
1.2 KiB
Plaintext

---
{%- 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/templates/arduino-arduinoide.desktop.j2
- template: jinja
- user: root
- group: root
- mode: 644
- onchanges:
- arduino-archive-extract
- arduino-symlink
arduino-cleanup:
software.cleanup:
- name: arduino
- path: {{ arduino.release_dir }}
- version: "{{ arduino.version }}"