2024-12-16 13:00:59 +00:00
|
|
|
---
|
|
|
|
- name: "Deployer - Certbot - Renew Certificates"
|
2024-12-16 17:54:36 +00:00
|
|
|
containers.podman.podman_container:
|
|
|
|
name: certbot
|
|
|
|
image: "docker.io/certbot/certbot:latest"
|
|
|
|
state: started
|
|
|
|
network: host
|
|
|
|
volumes:
|
|
|
|
- "{{ ansible_facts.user_dir }}/data/certbot:/etc/letsencrypt"
|
|
|
|
command: "renew"
|
|
|
|
detach: false
|
2024-12-16 13:00:59 +00:00
|
|
|
register: task
|
2024-12-16 17:54:36 +00:00
|
|
|
changed_when:
|
|
|
|
- task.stdout.find("No renewals were attempted.") == -1
|
2024-12-16 13:00:59 +00:00
|
|
|
tags:
|
|
|
|
- certbot
|
|
|
|
- tls
|
|
|
|
|
|
|
|
- name: "Deployer - Certbot - Copy Certificates"
|
|
|
|
copy:
|
2024-12-16 17:54:36 +00:00
|
|
|
src: "~/data/certbot/live/{{ cert }}/"
|
2024-12-16 13:00:59 +00:00
|
|
|
dest: "~/data/certificates/{{ cert }}/"
|
|
|
|
follow: true
|
|
|
|
loop: "{{ certs }}"
|
|
|
|
loop_control:
|
|
|
|
label: "{{ cert }}"
|
|
|
|
loop_var: "cert"
|
|
|
|
vars:
|
|
|
|
certs:
|
|
|
|
- arcadiamc
|
|
|
|
register: task
|
|
|
|
tags:
|
|
|
|
- certbot
|
|
|
|
- tls
|