26 lines
652 B
YAML
26 lines
652 B
YAML
---
|
|
# handlers file for postfix
|
|
|
|
- name: rebuild alias database
|
|
ansible.builtin.command: postmap "{{ postfix_alias_path }}"
|
|
|
|
- name: rebuild sender_access database
|
|
ansible.builtin.command: postmap "{{ postfix_sender_access_path }}"
|
|
|
|
- name: rebuild recipient_access database
|
|
ansible.builtin.command: postmap "{{ postfix_recipient_access_path }}"
|
|
|
|
- name: reload postfix
|
|
ansible.builtin.service:
|
|
name: "{{ postfix_service }}"
|
|
state: reloaded
|
|
when:
|
|
- not ansible_check_mode | bool
|
|
|
|
- name: restart postfix
|
|
ansible.builtin.service:
|
|
name: "{{ postfix_service }}"
|
|
state: restarted
|
|
when:
|
|
- not ansible_check_mode | bool
|