--- {%- 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 %}