Files
fedora-infra_ansible/roles/smtp-auth-relay/tasks/main.yml
Pavel Raiskup bee7b64fe5 main.cf files need to be moved before we claim they are templates
Revert "postfix: install main.cf as template"

This reverts commit 57f75cbcab.
2023-06-19 10:39:39 +02:00

26 lines
590 B
YAML

---
- 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