16 lines
649 B
YAML
16 lines
649 B
YAML
- name: server | utilities | install ssmtp
|
|
package:
|
|
name: "ssmtp"
|
|
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 }}"} |