ansible-sendmail/tasks/main.yml

36 lines
899 B
YAML

---
- name: Ensure sendmail is present
get_url:
url: "https://git.abbiamoundominio.org/blallo/sendmail/releases/download/{{ sendmail.version }}/sendmail"
dest: /usr/local/bin/sendmail
owner: root
group: root
mode: 0755
- name: Ensure sendmail template is present
template:
src: templates/sendmail.toml.j2
dest: /etc/sendmail.toml
owner: root
group: root
mode: 0644
vars:
- sections: "{{ sendmail.configuration }}"
- name: Ensure notify_unit_failure.sh is present
template:
src: templates/notify_unit_failure.sh
dest: /usr/local/bin/notify_unit_failure.sh
owner: root
group: root
mode: 0755
- name: Ensure notify-failure@.service is present
template:
src: templates/notify-failure@.service.j2
dest: /etc/systemd/system/notify-failure@.service
owner: root
group: root
mode: 0644
notify: reload systemd