From ccb10a97d79131595978ebdddb88aecc34f91aee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Fri, 1 Jul 2022 20:03:36 +0200 Subject: [PATCH] passff: Fix idempotency of download --- user.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/user.yml b/user.yml index 89bf2ab..82f75ab 100644 --- a/user.yml +++ b/user.yml @@ -440,6 +440,14 @@ state: directory 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 get_url: url: https://github.com/passff/passff-host/releases/download/1.2.2/{{ item.name }} @@ -448,6 +456,7 @@ group: "{{ user_group_name }}" mode: "{{ item.mode }}" force: false + when: not (passff_file.results | selectattr('item.name', 'eq', item.name) | list)[0].stat.exists loop: - name: passff.json mode: '0644'