standard mta on arch is not ssmtp

so use variable for distro specific mtas
This commit is contained in:
2022-07-07 22:49:08 +02:00
parent 2d65183017
commit 8f609a95e0
4 changed files with 4 additions and 2 deletions

View File

@@ -0,0 +1,16 @@
- name: server | utilities | install ssmtp
package:
name: "{{ mta_package }}"
state: present
when: postfix is not defined or postfix == false
- name: server | utitilies | configure ssmtp
lineinfile:
path: "/etc/ssmtp/ssmtp.conf" # required. The file to modify. Before Ansible 2.3 this option was only usable as I(dest), I(destfile) and I(name).
regexp: "{{ item.regex }}"
state: present
line: "{{ item.line }}"
loop:
- { regex: "^root=.*$", line: "root=rene@tantooine.myfirewall.org"}
- { regex: "^mailhub=.*", line: "mailhub=coruscant.universe.local"}
- { regex: "^hostname=.*", line: "hostname={{ ansible_fqdn }}"}