1
0
Fork 0
forked from infra/ansible

smtp_auth_relay: new role, use by copr-dist-git-dev for now

This commit is contained in:
Pavel Raiskup 2023-06-18 23:43:54 +02:00
commit 82205131b7
13 changed files with 740 additions and 1 deletions

View 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