This commit is contained in:
phil 2023-04-17 23:17:22 +02:00
parent 4e098544be
commit f32891c328
5 changed files with 11 additions and 6 deletions

View file

@ -9,16 +9,16 @@
ansible.builtin.lineinfile:
path: /etc/dehydrated/domains.txt
line: "mta-sts.{{ item.name }}"
when: "'dehydrated' in ansible_facts.packages and item.mta-sts is defined and item.mta-sts"
when: "'dehydrated' in ansible_facts.packages and item.mta_sts is defined and item.mta_sts"
loop: "{{ postfix_domains }}"
notify: Get certificate
- name: "MTA-STS | Copy Nginx configuration"
ansible.builtin.template:
src: nginx/nginx-mta-sts.j2
src: nginx/mta-sts.j2
dest: "/etc/nginx/sites-available/mta-sts.{{ item.name }}"
mode: "0644"
when: item.mta-sts is defined and item.mta-sts
when: item.mta_sts is defined and item.mta_sts
loop: "{{ postfix_domains }}"
- name: "MTA-STS | Enable Nginx configuration"
@ -26,6 +26,6 @@
src: "/etc/nginx/sites-available/mta-sts.{{ item.name }}"
dest: "/etc/nginx/sites-enabled/mta-sts.{{ item.name }}"
state: link
when: item.mta-sts is defined and item.mta-sts
when: item.mta_sts is defined and item.mta_sts
loop: "{{ postfix_domains }}"
notify: reload nginx