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)
38 lines
866 B
YAML
38 lines
866 B
YAML
---
|
|
- ansible.builtin.include_role:
|
|
name: evolix/remount-usr
|
|
tags: postfix
|
|
|
|
- name: copy spam.sh script
|
|
ansible.builtin.copy:
|
|
src: spam.sh
|
|
dest: /usr/share/scripts/spam.sh
|
|
mode: "0700"
|
|
tags: postfix
|
|
|
|
- name: Check if cron is installed
|
|
ansible.builtin.shell:
|
|
cmd: "set -o pipefail && dpkg -l cron 2>/dev/null | grep -q -E '^(i|h)i'"
|
|
executable: /bin/bash
|
|
check_mode: no
|
|
failed_when: False
|
|
changed_when: False
|
|
register: is_cron_installed
|
|
tags: postfix
|
|
|
|
- name: enable spam.sh cron
|
|
ansible.builtin.lineinfile:
|
|
dest: /etc/cron.d/spam
|
|
line: "42 * * * * root /usr/share/scripts/spam.sh"
|
|
create: yes
|
|
state: present
|
|
mode: "0640"
|
|
when: is_cron_installed.rc == 0
|
|
tags: postfix
|
|
|
|
- name: update antispam list
|
|
ansible.builtin.command:
|
|
cmd: /usr/share/scripts/spam.sh
|
|
changed_when: False
|
|
tags: postfix
|