diff --git a/postfix/tasks/common.yml b/postfix/tasks/common.yml index 6c4d3407..29e6dd07 100644 --- a/postfix/tasks/common.yml +++ b/postfix/tasks/common.yml @@ -1,14 +1,5 @@ --- -- 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 8a782782..36327b3e 100644 --- a/postfix/tasks/minimal.yml +++ b/postfix/tasks/minimal.yml @@ -1,4 +1,10 @@ --- +- 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 c07c2b60..6562e0d3 100644 --- a/postfix/tasks/packmail.yml +++ b/postfix/tasks/packmail.yml @@ -1,9 +1,11 @@ --- -- name: Complementary packmail packages are installed +- name: ensure packages are installed ansible.builtin.apt: name: + - postfix - postfix-ldap - postfix-policyd-spf-python + - mailgraph state: present tags: - postfix