1f8738fbda
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|2696|33|2663|34|:+1:
Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/467//ansiblelint">Evolix » ansible-roles » unstable #467</a>
gitea/ansible-roles/pipeline/head This commit looks good
postfix: * Move common packages installation in common.yml * Replace ansible_fqdn by evolinux_fqdn, set postfix_slow_transport_include to false by default (only for packmails and packwebs) * Remove dependency on evolinux_fqdn var * Do not overwrite main.cf if it has been modified (except if postfix_force_main_cf) evolinux-base: * Move exim4 purge from evolinux-base to postfix role * Call postfix role call after nagios role (dependency)
45 lines
898 B
YAML
45 lines
898 B
YAML
|
|
- 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'
|
|
changed_when: False
|
|
check_mode: no
|
|
register: main_cf_checksum
|
|
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
|