ansible-roles/postfix/tasks/common.yml

45 lines
898 B
YAML
Raw Normal View History

2018-02-04 11:49:14 +01:00
- name: Postfix packages are installed
ansible.builtin.apt:
name:
- postfix
- mailgraph
state: present
tags:
- postfix
- name: exim4 is absent
ansible.builtin.apt:
name:
- exim4
- exim4-base
- exim4-config
- exim4-daemon-light
purge: yes
state: absent
tags:
- postfix
when: postfix_purge_exim | bool
- name: compute main.cf SHA1 checksum
ansible.builtin.shell:
cmd: 'grep -v -E "^(myhostname|mydestination|mailbox_command)" /etc/postfix/main.cf | sha1sum | cut -d " " -f1'
2018-02-04 11:49:14 +01:00
changed_when: False
check_mode: no
register: main_cf_checksum
2018-02-04 11:49:14 +01:00
tags:
- postfix
- name: add lines in /etc/.gitignore
ansible.builtin.lineinfile:
2018-02-04 11:49:14 +01:00
dest: /etc/.gitignore
line: '{{ item }}'
state: present
create: no
loop:
2018-02-04 11:49:14 +01:00
- "postfix/sa-blacklist.access"
- "postfix/*.db"
tags:
- postfix
- etc-git