[nullmailer] PEPCRANSED BRO

certbot_on_virtu
_shirenn 2021-02-10 11:15:32 +01:00 committed by pa
parent bb5e69f0c7
commit acd8e3da2a
3 changed files with 11 additions and 13 deletions

View File

@ -0,0 +1,5 @@
---
glob_nullmailer:
root: root@crans.org
smtp_server: smtp.adm.crans.org
defaulthost: crans.org

View File

@ -1,14 +1,7 @@
#!/usr/bin/env ansible-playbook #!/usr/bin/env ansible-playbook
--- ---
# Redisdead is the main MX.
# Soyouz and titanic are the old backup MX.
# Boeing and sputnik are the new MX (still in installation ?).
# All other servers uses nullmailer to send local mail to Crans SMTP.
# Redirect local mail to mailserver
- hosts: crans_server,!postfix - hosts: crans_server,!postfix
vars: vars:
mail_root: root@crans.org nullmailer: "{{ glob_nullmailer | default({}) | combine(loc_nullmailer | default({})) }}"
mail_smtp_server: smtp.adm.crans.org roles:
mail_defaulthost: crans.org - nullmailer
roles: ["nullmailer"]

View File

@ -11,18 +11,18 @@
- name: Set nullmailer remotes - name: Set nullmailer remotes
copy: copy:
content: "{{ mail_smtp_server }} smtp\n" content: "{{ nullmailer.smtp_server }} smtp\n"
dest: /etc/nullmailer/remotes dest: /etc/nullmailer/remotes
mode: 0644 mode: 0644
- name: Set nullmailer adminaddr - name: Set nullmailer adminaddr
copy: copy:
content: "{{ mail_root }}\n" content: "{{ nullmailer.root }}\n"
dest: /etc/nullmailer/adminaddr dest: /etc/nullmailer/adminaddr
mode: 0644 mode: 0644
- name: Set nullmailer defaulthost - name: Set nullmailer defaulthost
copy: copy:
content: "{{ mail_defaulthost }}\n" content: "{{ nullmailer.defaulthost }}\n"
dest: /etc/nullmailer/defaulthost dest: /etc/nullmailer/defaulthost
mode: 0644 mode: 0644