From 0ad39a1be7f7e18bb1a51b7f82b30c95944b5ca9 Mon Sep 17 00:00:00 2001 From: Victor LABORIE Date: Tue, 25 Apr 2017 15:50:22 +0200 Subject: [PATCH] evolinux-base: update hostname in default postfix config --- evolinux-base/tasks/postfix.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/evolinux-base/tasks/postfix.yml b/evolinux-base/tasks/postfix.yml index e32b25dd..aa76cf52 100644 --- a/evolinux-base/tasks/postfix.yml +++ b/evolinux-base/tasks/postfix.yml @@ -12,6 +12,24 @@ - packages - postfix +- name: configure postfix myhostname + lineinfile: + dest: /etc/postfix/main.cf + state: present + line: "myhostname = {{ evolinux_hostname }}" + regexp: '^myhostname' + tags: + - postfix + +- name: configure postfix mynetworks + lineinfile: + dest: /etc/postfix/main.cf + state: present + line: "mydestination = {{ evolinux_hostname }}, localhost.localdomain, , localhost" + regexp: '^mydestination' + tags: + - postfix + - name: fetch users list shell: getent passwd | cut -d":" -f 1 | grep -v root check_mode: no