summaryrefslogtreecommitdiff
path: root/ansible/roles/mail-server
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-09-16 13:31:30 +0300
committerLars Wirzenius <liw@liw.fi>2017-09-16 13:47:47 +0300
commitcae4182c04f7d7e8bb5aed6e8c1703f602df9eb8 (patch)
tree435a836779bdd114ef38dad00ebf9102021a60cf /ansible/roles/mail-server
parent34cfcec62cd272f4093fa8a8dfc792545697298a (diff)
downloadansibleness-cae4182c04f7d7e8bb5aed6e8c1703f602df9eb8.tar.gz
Add: create sasl_passwd for smarthost credentials
Diffstat (limited to 'ansible/roles/mail-server')
-rw-r--r--ansible/roles/mail-server/tasks/postfix.yml8
1 files changed, 8 insertions, 0 deletions
diff --git a/ansible/roles/mail-server/tasks/postfix.yml b/ansible/roles/mail-server/tasks/postfix.yml
index 79ed2bb..6558e1e 100644
--- a/ansible/roles/mail-server/tasks/postfix.yml
+++ b/ansible/roles/mail-server/tasks/postfix.yml
@@ -64,3 +64,11 @@
group: root
mode: 0644
notify: restart postgrey
+
+- name: install smarthost creds
+ copy:
+ content: "{{ smarthost }} {{ smarthost_user }}:{{ lookup('pipe', 'pass show ' + smarthost_pass_name) }}\n"
+ dest: /etc/postfix/sasl_passwd
+ owner: root
+ group: root
+ mode: 0600