Create single virtual domain task
for use in other playbooks
This commit is contained in:
parent
5ef68a7f78
commit
822dfdb408
3 changed files with 18 additions and 2 deletions
|
@ -7,6 +7,10 @@
|
|||
ansible.builtin.import_tasks: postfix.yml
|
||||
tags: postfix
|
||||
|
||||
- name: Virtual domains
|
||||
ansible.builtin.import_tasks: virtual_domains.yml
|
||||
tags: virtual_domains
|
||||
|
||||
- name: OnionMX
|
||||
ansible.builtin.import_tasks: onionmx.yml
|
||||
tags: onionmx
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
- sender_checks
|
||||
- transport_global_exceptions
|
||||
- transport_relay
|
||||
- virtual_domains
|
||||
notify: reload postfix
|
||||
|
||||
- name: "Postfix | Run postmap"
|
||||
|
@ -64,7 +63,6 @@
|
|||
- file: relay_checks
|
||||
- file: sender_checks
|
||||
- file: transport_relay
|
||||
- file: virtual_domains
|
||||
|
||||
- name: "Postfix | Create dhparam file"
|
||||
community.crypto.openssl_dhparam:
|
||||
|
|
14
tasks/virtual_domains.yml
Normal file
14
tasks/virtual_domains.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
- name: "Virtual domain | Copy lookup tables from templates"
|
||||
ansible.builtin.template:
|
||||
src: "postfix/conf.d/virtual_domains.j2"
|
||||
dest: "{{ postfix_conf_dir }}/virtual_domains"
|
||||
mode: "0644"
|
||||
notify: reload postfix
|
||||
|
||||
- name: "Postfix | Run postmap"
|
||||
ansible.builtin.command: "postmap cdb:virtual_domains"
|
||||
args:
|
||||
chdir: "{{ postfix_conf_dir }}"
|
||||
changed_when: false
|
||||
notify: reload postfix
|
Loading…
Reference in a new issue