mattez02-infra/tasks/deployer.yml

35 lines
770 B
YAML
Raw Normal View History

2024-12-16 13:00:59 +00:00
---
- 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
2024-12-16 13:00:59 +00:00
register: task
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:
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