klips/ansible/roles/postfix/tasks/configure.yml

21 lines
631 B
YAML
Raw Normal View History

2020-04-23 01:44:57 +00:00
---
- name: Copy postfix configuration template
template: src=files/postfix/main.cf dest=/etc/postfix/main.cf
- name: Copy postfix sasl_passwd
template: src=files/postfix/sasl_passwd dest=/etc/postfix/sasl/sasl_passwd
- name: Copy init-mail.sh script to remote hosts
copy: src=files/postfix/init-mail.sh dest=/etc/postfix/init-mail.sh
- name: Touch a file, using symbolic modes to set the permissions (equivalent to 0644)
file:
path: /etc/postfix/init-mail.sh
state: touch
mode: u=rwx,g=rwx,o=rwx
- name: Run script to initialize postfix
script: files/postfix/init-mail.sh
notify:
- restart postfix