feat(role): Initial commit

This commit is contained in:
2025-04-02 23:39:17 +02:00
parent 35a7aa165a
commit 78e80101b3
10 changed files with 200 additions and 2 deletions

24
handlers/main.yml Normal file
View File

@@ -0,0 +1,24 @@
# SPDX-License-Identifier: MIT
- name: 'Rebuild Postfix lookup tables'
loop_control:
loop_var: 'somta_postfix_postmap_handler'
label: 'Rebuild ''/etc/postfix/{{ somta_postfix_postmap_handler.lookup_table_source_file }}'' lookup table'
loop:
- { lookup_table_source_file: 'sasl_passwd.j2' }
- { lookup_table_source_file: 'sender_canonical_maps.j2' }
- { lookup_table_source_file: 'smtp_header_checks' }
ansible.builtin.shell: |
postmap '/etc/postfix/{{ somta_postfix_postmap_handler.lookup_table_source_file }}'
listen: 'Ensure that a Mail Transfer Agent is running with newest config'
- name: 'Rebuild e-mail aliases lookup tables'
ansible.builtin.shell: |
newaliases
listen: 'Ensure that a Mail Transfer Agent is running with newest config'
- name: 'Restart postfix.service'
ansible.builtin.service:
name: 'postfix.service'
state: 'restarted'
enabled: true
listen: 'Ensure that a Mail Transfer Agent is running with newest config'