passff: Fix idempotency of download
This commit is contained in:
9
user.yml
9
user.yml
@@ -440,6 +440,14 @@
|
|||||||
state: directory
|
state: directory
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
|
||||||
|
- name: check if host application file already exists
|
||||||
|
stat:
|
||||||
|
path: ~/.mozilla/native-messaging-hosts/{{ item.name }}
|
||||||
|
register: passff_file
|
||||||
|
loop:
|
||||||
|
- name: passff.json
|
||||||
|
- name: passff.py
|
||||||
|
|
||||||
- name: firefox - get passff host application
|
- name: firefox - get passff host application
|
||||||
get_url:
|
get_url:
|
||||||
url: https://github.com/passff/passff-host/releases/download/1.2.2/{{ item.name }}
|
url: https://github.com/passff/passff-host/releases/download/1.2.2/{{ item.name }}
|
||||||
@@ -448,6 +456,7 @@
|
|||||||
group: "{{ user_group_name }}"
|
group: "{{ user_group_name }}"
|
||||||
mode: "{{ item.mode }}"
|
mode: "{{ item.mode }}"
|
||||||
force: false
|
force: false
|
||||||
|
when: not (passff_file.results | selectattr('item.name', 'eq', item.name) | list)[0].stat.exists
|
||||||
loop:
|
loop:
|
||||||
- name: passff.json
|
- name: passff.json
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
|||||||
Reference in New Issue
Block a user