ansible/roles/nullmailer/tasks/main.yml
Yohann D'ANELLO 16be7d5acf
All checks were successful
continuous-integration/drone/push Build is passing
Prepare nullmailer configuration
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
2021-03-04 02:36:09 +01:00

34 lines
735 B
YAML

---
- name: Install nullmailer
apt:
update_cache: true
name:
- nullmailer
- bsd-mailx
register: apt_result
retries: 3
until: apt_result is succeeded
- name: Set nullmailer remotes
copy:
content: "{{ nullmailer.smtp_server }} smtp\n"
dest: /etc/nullmailer/remotes
mode: 0644
- name: Set nullmailer adminaddr
copy:
content: "{{ nullmailer.root }}\n"
dest: /etc/nullmailer/adminaddr
mode: 0644
- name: Set nullmailer defaulthost
copy:
content: "{{ nullmailer.defaulthost }}\n"
dest: /etc/nullmailer/defaulthost
mode: 0644
- name: Set nullmailer allmailfrom
copy:
content: "{{ nullmailer.allmailfrom }}\n"
dest: /etc/nullmailer/allmailfrom
mode: 0644