ansible-role-server/tasks/cronmails-Centos.yml
Jannik Beyerstedt a0ac0a67a7 [TIDY] move when statements, fix whitespace
Having the when condition of a task at the top instead of bottom is
easiert to read. Also some spaces were another whitespace character on
accident.
2022-02-13 20:52:02 +01:00

43 lines
1.3 KiB
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
# Server/Cronmails: Setup Mails from Cronjobs (install exim) - CentOS Version
# Install exim
- name: cronmails - Install exim4 as MTA
become: yes
ansible.builtin.yum:
name: "{{ packages }}"
state: present
vars:
packages:
- exim
# Configure exim
- name: cronmails - Create exim config folder
become: yes
ansible.builtin.file:
path: /etc/exim
state: directory
# TODO: exim config works quite differently on CentOS compared to Debian!!!
# # - name: cronmails - Copy exim config template
# # become: yes
# # ansible.builtin.copy:
# # src: "{{ role_path }}/files/exim4.conf.template"
# # dest: /etc/exim/exim.conf.template
# # register: cronmails_conftmp_update
# # - name: cronmails - Copy exim config file
# # become: yes
# # ansible.builtin.template:
# # src: "{{ role_path }}/templates/update-exim4.conf.conf"
# # dest: /etc/exim/update-exim.conf.conf
# # register: cronmails_conffile_update
# # - name: cronmails - Run update-exim.conf
# # when: cronmails_conftmp_update.changed or cronmails_conffile_update.changed
# # become: yes
# # ansible.builtin.shell: "update-exim.conf"
# - name: cronmails - Enable and start exim
# become: yes
# ansible.builtin.service:
# name: exim
# state: started
# enabled: yes