From ec4fd5d27f22c0f42cfb35626b60a848dfd05e6d Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Thu, 31 Aug 2023 17:02:54 +0200 Subject: [PATCH] postfix: Move common packages installation in common.yml --- postfix/tasks/common.yml | 9 +++++++++ postfix/tasks/minimal.yml | 6 ------ postfix/tasks/packmail.yml | 4 +--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/postfix/tasks/common.yml b/postfix/tasks/common.yml index 29e6dd07..6c4d3407 100644 --- a/postfix/tasks/common.yml +++ b/postfix/tasks/common.yml @@ -1,5 +1,14 @@ --- +- name: Postfix packages are installed + ansible.builtin.apt: + name: + - postfix + - mailgraph + state: present + tags: + - postfix + - name: check if main.cf is default ansible.builtin.shell: cmd: 'grep -v -E "^(myhostname|mydestination|mailbox_command)" /etc/postfix/main.cf | md5sum -' diff --git a/postfix/tasks/minimal.yml b/postfix/tasks/minimal.yml index 36327b3e..8a782782 100644 --- a/postfix/tasks/minimal.yml +++ b/postfix/tasks/minimal.yml @@ -1,10 +1,4 @@ --- -- name: ensure packages are installed - ansible.builtin.apt: - name: postfix - state: present - tags: - - postfix - name: create minimal main.cf ansible.builtin.template: diff --git a/postfix/tasks/packmail.yml b/postfix/tasks/packmail.yml index 6562e0d3..c07c2b60 100644 --- a/postfix/tasks/packmail.yml +++ b/postfix/tasks/packmail.yml @@ -1,11 +1,9 @@ --- -- name: ensure packages are installed +- name: Complementary packmail packages are installed ansible.builtin.apt: name: - - postfix - postfix-ldap - postfix-policyd-spf-python - - mailgraph state: present tags: - postfix