diff --git a/tasks/communication.yml b/tasks/communication.yml index 132cc97..cf3d85f 100644 --- a/tasks/communication.yml +++ b/tasks/communication.yml @@ -3,9 +3,9 @@ block: - name: postfix | Apply postfix configuration lineinfile: - dest: "{{ item.dest }}" - regexp: "{{ item.regexp }}" - line: "{{ item.line }}" + dest: "{{ configurations.dest }}" + regexp: "{{ configurations.regexp }}" + line: "{{ configurations.line }}" insertafter: EOF notify: Restart Postfix when: "'SMTP0' not in inventory_hostname" @@ -30,6 +30,8 @@ regexp: "^.?smtp_randomize_addresses =", line: "smtp_randomize_addresses = no", } + loop_control: + loop_var: configurations - name: postfix | Ensure Postfix is Started/Enabled service: