proxmox: set mail relay
This commit is contained in:
parent
9932064758
commit
af81aae8bd
|
@ -6,6 +6,12 @@
|
||||||
command: ifreload -a
|
command: ifreload -a
|
||||||
when: "'handler' not in ansible_skip_tags"
|
when: "'handler' not in ansible_skip_tags"
|
||||||
|
|
||||||
|
- name: reload postfix
|
||||||
|
service:
|
||||||
|
name: postfix
|
||||||
|
state: reloaded
|
||||||
|
when: "'handler' not in ansible_skip_tags"
|
||||||
|
|
||||||
- name: update package cache
|
- name: update package cache
|
||||||
package:
|
package:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
|
|
@ -57,6 +57,14 @@
|
||||||
| sort | unique | join(";") }}'
|
| sort | unique | join(";") }}'
|
||||||
changed_when: false # maybe write a proper check if certificate requests are ever ansibled
|
changed_when: false # maybe write a proper check if certificate requests are ever ansibled
|
||||||
|
|
||||||
|
- name: Set SMTP relay
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/postfix/main.cf
|
||||||
|
regexp: '^relayhost ='
|
||||||
|
line: 'relayhost = {{ mail_relay }}'
|
||||||
|
notify: reload postfix
|
||||||
|
when: mail_relay is defined
|
||||||
|
|
||||||
- include_tasks: firewall.yml
|
- include_tasks: firewall.yml
|
||||||
|
|
||||||
- include_tasks: user.yml
|
- include_tasks: user.yml
|
||||||
|
|
Loading…
Reference in a new issue