standard mta on arch is not ssmtp
so use variable for distro specific mtas
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
- name: server | utilities | install ssmtp
|
- name: server | utilities | install {{ mta_package }}
|
||||||
package:
|
package:
|
||||||
name: "{{ mta_package }}"
|
name: "{{ mta_package }}"
|
||||||
state: present
|
state: present
|
||||||
when: postfix is not defined or postfix == false
|
when: postfix is not defined or postfix == false
|
||||||
|
|
||||||
- name: server | utitilies | configure ssmtp
|
- name: server | utitilies | configure {{ mta_package }}
|
||||||
lineinfile:
|
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).
|
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 }}"
|
regexp: "{{ item.regex }}"
|
||||||
@@ -14,3 +14,4 @@
|
|||||||
- { regex: "^root=.*$", line: "root=rene@tantooine.myfirewall.org"}
|
- { regex: "^root=.*$", line: "root=rene@tantooine.myfirewall.org"}
|
||||||
- { regex: "^mailhub=.*", line: "mailhub=coruscant.universe.local"}
|
- { regex: "^mailhub=.*", line: "mailhub=coruscant.universe.local"}
|
||||||
- { regex: "^hostname=.*", line: "hostname={{ ansible_fqdn }}"}
|
- { regex: "^hostname=.*", line: "hostname={{ ansible_fqdn }}"}
|
||||||
|
when: ansible_distribution in ["Debian", "Pop!_OS", "Ubuntu"]
|
||||||
Reference in New Issue
Block a user