Add postfix ansible roll
This commit is contained in:
20
ansible/roles/postfix/tasks/configure.yml
Normal file
20
ansible/roles/postfix/tasks/configure.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
- 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
|
||||
Reference in New Issue
Block a user