add creation of white list
This commit is contained in:
parent
1e01166fdb
commit
4c41a3f4df
2 changed files with 18 additions and 4 deletions
|
@ -6,3 +6,9 @@
|
|||
service:
|
||||
name: postfix
|
||||
state: restarted
|
||||
|
||||
- name: Postmap whitelist
|
||||
shell: /usr/sbin/postmap /etc/postfix/maps/whitelist_senders.map
|
||||
|
||||
- name: Postmap blacklist
|
||||
shell: /usr/sbin/postmap /etc/postfix/blacklist
|
||||
|
|
|
@ -207,6 +207,16 @@
|
|||
group: postfix
|
||||
mode: 0644
|
||||
|
||||
- name: Ensure white list senders file exists
|
||||
file:
|
||||
state: touch
|
||||
path: /etc/postfix/maps/whitelist_senders.map
|
||||
owner: root
|
||||
group: postfix
|
||||
mode: 0644
|
||||
notify: Postmap whitelist
|
||||
|
||||
|
||||
- name: Create local aliases
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/aliases
|
||||
|
@ -260,6 +270,4 @@
|
|||
backup: true
|
||||
create: true
|
||||
loop: "{{ postfix_blacklist }}"
|
||||
|
||||
- name: Postmap blacklist
|
||||
shell: /usr/sbin/postmap /etc/postfix/blacklist
|
||||
notify: Postmap blacklist
|
||||
|
|
Loading…
Reference in a new issue