diff options
author | Christian Pointner <equinox@spreadspace.org> | 2024-07-05 21:00:30 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2024-07-05 21:00:30 +0200 |
commit | ae89800f1fd5083585cd879ac26b32eb5c458170 (patch) | |
tree | e3cea9c559dc05caad5ea094a753dd99ef911b95 /roles/mail/postfix/base/tasks | |
parent | upgrade whawty/auth on ch-apps (diff) |
move postfix rules to mail subdir
Diffstat (limited to 'roles/mail/postfix/base/tasks')
-rw-r--r-- | roles/mail/postfix/base/tasks/main.yml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/roles/mail/postfix/base/tasks/main.yml b/roles/mail/postfix/base/tasks/main.yml new file mode 100644 index 00000000..8cb55fe0 --- /dev/null +++ b/roles/mail/postfix/base/tasks/main.yml @@ -0,0 +1,22 @@ +--- +- name: install postfix package + apt: + name: postfix + state: present + +- name: basic postfix options + vars: + postfix_options: + mydestination: "{{ postfix_base_mydestination | join(', ') }}" + mynetworks: "{{ postfix_base_mynetworks | join(', ') }}" + relayhost: "{{ postfix_base_relayhost }}" + inet_interfaces: "{{ postfix_base_inet_interfaces | join(', ') }}" + inet_protocols: "{{ postfix_base_inet_protocols | join(', ') }}" + loop: "{{ postfix_options | dict2items }}" + loop_control: + label: "{{ item.key }} = {{ item.value }}" + lineinfile: + regexp: "^#?\\s*{{ item.key }}\\s*=" + line: "{{ item.key }} = {{ item.value }}" + dest: /etc/postfix/main.cf + notify: restart postfix |