multiple domains working

This commit is contained in:
2024-05-22 12:31:41 -04:00
parent eb934c32e2
commit d732fffd67
7 changed files with 49 additions and 139 deletions

View File

@@ -12,17 +12,11 @@
name:
- certbot
state: present
- name: Stop nginx service so we can get certs
ansible.builtin.systemd_service:
state: stopped
name: nginx
- name: Get certs for all reeseapps domains
ansible.builtin.shell: /usr/bin/certbot certonly --standalone -d '{{ item.external.domain }}' -n
loop: "{{ reeseapps }}"
- name: Get certs for all reeseseal domains
ansible.builtin.shell: /usr/bin/certbot certonly --dns-route53 -d '{{ item.external.domain }}' -n
loop: "{{ reeseseal }}"
- name: Get certs for all domains
ansible.builtin.shell: /usr/bin/certbot certonly --dns-route53 -d '{{ item.1 }}' -n
# Loops over every external.domains sub list
loop: "{{ http | subelements('external.domains') }}"
- name: Start nginx service
ansible.builtin.systemd_service:
state: started
state: reloaded
name: nginx