diff --git a/roles/backup_client/handlers/main.yml b/roles/backup_client/handlers/main.yml index fe46ba7eca18c434a6745e7a39f8ba254ec336a6..12864870108cb14d0412b05d2b29865d49da5374 100644 --- a/roles/backup_client/handlers/main.yml +++ b/roles/backup_client/handlers/main.yml @@ -1,13 +1,15 @@ --- - name: Clean-up GnuPG keyring for import of new keys - shell: "rm -f /etc/duply/main/gnupg/*" - tags: - # [ANSIBLE0007] rm used in place of argument state=absent to file module - # This task is invoked only if user is very specific about requiring to - # run the handlers manually as a way to bring the system to consistency - # after interrupted runs. - - skip_ansible_lint + file: + path: "/etc/duply/main/gnupg" + state: "{{ item }}" + owner: root + group: root + mode: 0700 + with_items: + - absent + - directory - name: Import private keys command: "{{ gnupg_binary }} --homedir /etc/duply/main/gnupg --import /etc/duply/main/private_keys.asc"