ansible-roles/postfix/tasks/common.yml

33 lines
655 B
YAML

---
- 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 -'
changed_when: False
check_mode: no
register: default_main_cf
tags:
- postfix
- name: add lines in /etc/.gitignore
ansible.builtin.lineinfile:
dest: /etc/.gitignore
line: '{{ item }}'
state: present
create: no
loop:
- "postfix/sa-blacklist.access"
- "postfix/*.db"
tags:
- postfix
- etc-git