From 5c4dfb5d2e664883e372d0a58af98450b743a5dc Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 29 Sep 2021 18:00:05 +0200 Subject: [PATCH] Update to 2021-09-29 18:00 --- roles/common/tasks/mail.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/roles/common/tasks/mail.yml b/roles/common/tasks/mail.yml index a135544..084107d 100644 --- a/roles/common/tasks/mail.yml +++ b/roles/common/tasks/mail.yml @@ -1,11 +1,15 @@ --- -- name: Configure root email forward - lineinfile: - dest: /etc/aliases - regexp: "^root:.*" - line: "root: {{ system_admin_email }}" - notify: newaliases - when: system_admin_email is defined +- when: system_admin_email is defined + block: + - name: Install postfix + package: name=postfix + + - name: Configure root email forward + lineinfile: + dest: /etc/aliases + regexp: "^root:.*" + line: "root: {{ system_admin_email }}" + notify: newaliases ...