diff options
Diffstat (limited to 'roles/certbot/tasks')
| -rw-r--r-- | roles/certbot/tasks/main.yml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/roles/certbot/tasks/main.yml b/roles/certbot/tasks/main.yml new file mode 100644 index 0000000..02e8c0b --- /dev/null +++ b/roles/certbot/tasks/main.yml @@ -0,0 +1,23 @@ +--- +- name: Ensure Certbot and Nginx plugin are installed + ansible.builtin.apt: + name: + - certbot + - python3-certbot-nginx + state: present + +- name: Ensure certbot renewal timer is enabled and active + ansible.builtin.systemd: + name: certbot.timer + enabled: true + state: started + +- name: Verify primary domain TLS certificate exists + ansible.builtin.stat: + path: "/etc/letsencrypt/live/{{ primary_domain }}/fullchain.pem" + register: primary_cert + +- name: Verify SearXNG domain TLS certificate exists + ansible.builtin.stat: + path: "/etc/letsencrypt/live/{{ searxng_domain }}/fullchain.pem" + register: searxng_cert |
