mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-06-14 22:36:09 +08:00
26 lines
590 B
YAML
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
|