From 9dfe6fd175d41f310cb3ac3612575fb6e7579902 Mon Sep 17 00:00:00 2001 From: Victor LABORIE Date: Thu, 27 Apr 2017 10:41:18 +0200 Subject: [PATCH] evolinux-base: use fqdn in default postfix config and add handler --- evolinux-base/handlers/main.yml | 5 +++++ evolinux-base/tasks/postfix.yml | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/evolinux-base/handlers/main.yml b/evolinux-base/handlers/main.yml index d4e6707a..39db70f3 100644 --- a/evolinux-base/handlers/main.yml +++ b/evolinux-base/handlers/main.yml @@ -58,3 +58,8 @@ service: name: ssh state: reloaded + +- name: reload postfix + service: + name: postfix + state: reloaded diff --git a/evolinux-base/tasks/postfix.yml b/evolinux-base/tasks/postfix.yml index aa76cf52..2ffc1558 100644 --- a/evolinux-base/tasks/postfix.yml +++ b/evolinux-base/tasks/postfix.yml @@ -16,8 +16,9 @@ lineinfile: dest: /etc/postfix/main.cf state: present - line: "myhostname = {{ evolinux_hostname }}" + line: "myhostname = {{ evolinux_fqdn }}" regexp: '^myhostname' + notify: reload postfix tags: - postfix @@ -25,8 +26,9 @@ lineinfile: dest: /etc/postfix/main.cf state: present - line: "mydestination = {{ evolinux_hostname }}, localhost.localdomain, , localhost" + line: "mydestination = {{ evolinux_fqdn }}, localhost.localdomain, , localhost" regexp: '^mydestination' + notify: reload postfix tags: - postfix