ansible-role-postfix/tasks/domains.yml

21 lines
490 B
YAML
Raw Normal View History

---
- name: "Domains | Copy lookup tables from templates"
ansible.builtin.template:
src: "postfix/conf.d/{{ item }}.j2"
dest: "{{ postfix_conf_dir }}/{{ item }}"
mode: "0644"
notify: reload postfix
loop:
- relay_domains
- virtual_domains
- name: "Domains | Run postmap"
ansible.builtin.command: "postmap cdb:{{ item }}"
args:
chdir: "{{ postfix_conf_dir }}"
changed_when: false
notify: reload postfix
loop:
- relay_domains
- virtual_domains