role_podman_nextcloud/tasks/certificates.yml
2025-12-09 16:42:05 -05:00

18 lines
465 B
YAML

- name: Check for certs
file:
path: "/home/{{ user.name }}/proxy/certs/{{ item }}"
state: file
loop:
- "{{ inventory_hostname }}.key"
- "{{ inventory_hostname }}.crt"
ignore_errors: true
register: iscert
- debug: msg="{{ iscert.msg }}"
- import_tasks: certificates_self.yml
when: "'self' in certificates and 'failed' in iscert.msg"
- import_tasks: certificates_certbot.yml
when: "'certbot' in certificates and 'failed' in iscert.msg"