forked from infra/ansible
smtp_auth_relay: new role, use by copr-dist-git-dev for now
This commit is contained in:
parent
2be84b22aa
commit
82205131b7
13 changed files with 740 additions and 1 deletions
25
roles/smtp-auth-relay/tasks/main.yml
Normal file
25
roles/smtp-auth-relay/tasks/main.yml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
- name: install the needed packages
|
||||
package:
|
||||
name:
|
||||
- postfix
|
||||
- cyrus-sasl
|
||||
- cyrus-sasl-plain
|
||||
tags:
|
||||
- smtp_auth_relay
|
||||
|
||||
- name: create the password file
|
||||
copy:
|
||||
dest: /etc/postfix/sasl_passwd
|
||||
content: "{{ smtp_auth_relay_host }} {{ smtp_auth_relay_user }}:{{ smtp_auth_relay_password }}"
|
||||
mode: 0600
|
||||
register: smtp_relay_password_file
|
||||
tags:
|
||||
- smtp_auth_relay
|
||||
|
||||
- name: regenerate the password db file
|
||||
shell: postmap /etc/postfix/sasl_passwd
|
||||
when: smtp_relay_password_file.changed
|
||||
notify: restart postfix
|
||||
tags:
|
||||
- smtp_auth_relay
|
||||
Loading…
Add table
Add a link
Reference in a new issue