Fixes
This commit is contained in:
parent
4e098544be
commit
f32891c328
5 changed files with 11 additions and 6 deletions
|
@ -29,7 +29,7 @@
|
|||
tags: tls-helper
|
||||
|
||||
- name: MTA-STS
|
||||
ansible.builtin.import_tasks: mta-sts.yml
|
||||
ansible.builtin.include_tasks: mta-sts.yml
|
||||
tags: mta-sts
|
||||
loop: "{{ postfix_domains }}"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
ansible.builtin.command:
|
||||
cmd: "postmap {{ postfix_default_db_type }}:{{ tls_helper_domains_file }}"
|
||||
chdir: "{{ tls_helper_postfix_dir }}"
|
||||
creates: "{{ tls_helper_postfix_dir }}/{{ tls_helper_domains_file }}.{{ postfix_default_db_type }}"
|
||||
|
||||
- name: "TLS-helper | Link files"
|
||||
ansible.builtin.file:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue