diff options
| author | Dennis Brentjes <d.brentjes@gmail.com> | 2016-08-28 16:08:42 +0200 |
|---|---|---|
| committer | Dennis Brentjes <d.brentjes@gmail.com> | 2016-08-28 16:14:56 +0200 |
| commit | 68515bbb478f326a252ca688fcc97f3fdc8c4f97 (patch) | |
| tree | 05954f1bf339c6ad973ed07736e0d328d5fbe3db /roles/postfix/tasks | |
| download | ansible-68515bbb478f326a252ca688fcc97f3fdc8c4f97.tar.gz ansible-68515bbb478f326a252ca688fcc97f3fdc8c4f97.tar.bz2 ansible-68515bbb478f326a252ca688fcc97f3fdc8c4f97.zip | |
Initial commit, finally got around to cleanup and make it into a
gitrepo.
Diffstat (limited to 'roles/postfix/tasks')
| -rw-r--r-- | roles/postfix/tasks/main.yml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/roles/postfix/tasks/main.yml b/roles/postfix/tasks/main.yml new file mode 100644 index 0000000..8c51a91 --- /dev/null +++ b/roles/postfix/tasks/main.yml @@ -0,0 +1,31 @@ +--- +- name: Install postfix + become: yes + pacman: name=postfix state=present update_cache=yes + +- name: copy master.cf + become: yes + copy: src=master.cf dest=/etc/postfix/master.cf + +- name: copy main.cf, mysql-virtual-alias-maps.cf mysql-virtual-mailbox-domains.cf and mysql-virtual-mailbox-maps.cf + become: yes + template: src={{ item.input }} dest=/etc/postfix/{{ item.output }} mode={{ item.mode }} + with_items: + - { input: main.cf.j2, output: main.cf, mode: 644 } + - { input: mysql-virtual-alias-maps.cf.j2, output: mysql-virtual-alias-maps.cf, mode: 640 } + - { input: mysql-virtual-mailbox-domains.cf.j2, output: mysql-virtual-mailbox-domains.cf, mode: 640 } + - { input: mysql-virtual-mailbox-maps.cf.j2, output: mysql-virtual-mailbox-maps.cf, mode: 640 } + +- name: copy aliases + become: yes + copy: remote_src=yes src=/etc/postfix/aliases dest=/etc/aliases + +- name: create aliases.db + become: yes + command: newaliases + args: + creates: /etc/aliases.dbr + +- name: start and enable postfix + become: yes + service: name=postfix state=started enabled=yes |
