labsync/packer/ansible/roles/inkscape/tasks/inkstitch.yml
2022-07-07 19:04:09 +00:00

31 lines
981 B
YAML

---
- command: dpkg-query -W inkstitch
register: inkstitch_query
check_mode: false
failed_when: inkstitch_query.rc > 1
changed_when: false
- set_fact:
inkstitch_installed_version: "{{ (inkstitch_query.stdout | split('\t'))[1] }}"
when: inkstitch_query.rc == 0
- ansible.builtin.tempfile:
state: file
suffix: .deb
register: inkstitch_deb
when: inkstitch_installed_version | default('') != inkstitch_version
- name: download inkstitch package
ansible.builtin.get_url:
url: https://github.com/inkstitch/inkstitch/releases/download/v2.1.2/inkstitch_{{ inkstitch_version }}_amd64.deb
dest: "{{ inkstitch_deb.path }}"
force: yes
mode: '0644'
owner: root
group: root
when: not ansible_check_mode and inkstitch_installed_version | default('') != inkstitch_version
- name: install inkstitch
apt:
deb: "{{ inkstitch_deb.path }}"
when: not ansible_check_mode and inkstitch_installed_version | default('') != inkstitch_version