mattez02-infra/tasks/deployer.yml
2024-12-16 19:54:36 +02:00

35 lines
770 B
YAML

---
- name: "Deployer - Certbot - Renew Certificates"
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
register: task
changed_when:
- task.stdout.find("No renewals were attempted.") == -1
tags:
- certbot
- tls
- name: "Deployer - Certbot - Copy Certificates"
copy:
src: "~/data/certbot/live/{{ cert }}/"
dest: "~/data/certificates/{{ cert }}/"
follow: true
loop: "{{ certs }}"
loop_control:
label: "{{ cert }}"
loop_var: "cert"
vars:
certs:
- arcadiamc
register: task
tags:
- certbot
- tls