ansible-acme-sh icon indicating copy to clipboard operation
ansible-acme-sh copied to clipboard

Cleaning installed certificates not working

Open nadley opened this issue 4 years ago • 0 comments

Hi, Ansible version : 2.9.9

It looks like there is an issue to delete installed certificates when setting remove option to True in domain definition.

acme_sh_domains:
  - domains: ["sub.domain.tld"]
    remove: True

The following tasks should do the cleanup but says only [OK] and nothing is cleaning the files are still here on the file system. It looks like using a wildcard is not working.

- name: Remove acme.sh installed certificate files
  file:
    path: "{{ acme_sh_copy_certs_to_path }}/{{ item.domains | first }}*"
    state: "absent"
  loop: "{{ acme_sh_domains }}"
  when:
    - acme_sh_domains and item.domains is defined and item.domains
    - item.remove is defined and item.remove
    - not acme_sh_uninstall

I report the issue, may be going to try to fix it later.

nadley avatar Nov 19 '20 15:11 nadley