Move postfix configuration to block

This commit is contained in:
2018-06-27 21:13:40 +12:00
parent 3b2de81b2b
commit b6d7c14c2d

View File

@@ -1,5 +1,7 @@
--- ---
- name: Apply postfix configuration - name: Postfix Configuration
block:
- name: postfix | Apply postfix configuration
lineinfile: lineinfile:
dest: "{{item.dest}}" dest: "{{item.dest}}"
regexp: "{{item.regexp}}" regexp: "{{item.regexp}}"
@@ -26,11 +28,12 @@
line: "smtp_randomize_addresses = no" line: "smtp_randomize_addresses = no"
} }
- name: Ensure Postfix is Started/Enabled - name: postfix | Ensure Postfix is Started/Enabled
service: service:
name: postfix name: postfix
state: started state: started
enabled: yes enabled: yes
when: "{{ postfix_configure }}"
- name: Ensure root forwarding address is set - name: Ensure root forwarding address is set
lineinfile: lineinfile: