From ae89800f1fd5083585cd879ac26b32eb5c458170 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 5 Jul 2024 21:00:30 +0200 Subject: move postfix rules to mail subdir --- roles/mail/postfix/base/tasks/main.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 roles/mail/postfix/base/tasks/main.yml (limited to 'roles/mail/postfix/base/tasks/main.yml') 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 -- cgit v1.2.3