mirror of
https://github.com/MatteZ02/infra.git
synced 2024-12-23 08:53:17 +00:00
35 lines
770 B
YAML
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
|