Prepare nullmailer configuration
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
parent
52f73288b4
commit
16be7d5acf
3 changed files with 46 additions and 0 deletions
6
group_vars/all/nullmailer.yml
Normal file
6
group_vars/all/nullmailer.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
glob_nullmailer:
|
||||||
|
root: root@auro.re
|
||||||
|
smtp_server: smtp.adm.auro.re
|
||||||
|
defaulthost: auro.re
|
||||||
|
allmailfrom: root@auro.re
|
6
nullmailer.yml
Executable file
6
nullmailer.yml
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/env ansible-playbook
|
||||||
|
---
|
||||||
|
# Deploy Docker hosts
|
||||||
|
- hosts: vm,pve # FIXME ADD MAIL SERVER TO PREVENT ACCIDENTS
|
||||||
|
roles:
|
||||||
|
- nullmailer
|
34
roles/nullmailer/tasks/main.yml
Normal file
34
roles/nullmailer/tasks/main.yml
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
---
|
||||||
|
- 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
|
Loading…
Reference in a new issue