diff options
author | Lars Wirzenius <liw@liw.fi> | 2016-04-23 13:01:59 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2016-04-23 13:01:59 +0100 |
commit | 653a474db40f127477b53d11ae5b50ca743a67d5 (patch) | |
tree | 9d0e5b5e9f9abe017965a421fd5b63904c157233 /ansible/roles/mail-client | |
parent | 9382f4be780bc8b80cb7d776ca75ccfb3d1784fd (diff) | |
download | ansibleness-653a474db40f127477b53d11ae5b50ca743a67d5.tar.gz |
Add SMTP relaying to mail-client role
Diffstat (limited to 'ansible/roles/mail-client')
-rw-r--r-- | ansible/roles/mail-client/tasks/main.yml | 8 | ||||
-rw-r--r-- | ansible/roles/mail-client/templates/sasl_passwd | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/ansible/roles/mail-client/tasks/main.yml b/ansible/roles/mail-client/tasks/main.yml index 813cd6a..f7a762b 100644 --- a/ansible/roles/mail-client/tasks/main.yml +++ b/ansible/roles/mail-client/tasks/main.yml @@ -12,3 +12,11 @@ - template: src: main.cf dest: /etc/postfix/main.cf + +# Set up the smarthost relay credentials. +- template: + src: sasl_passwd + dest: /etc/postfix/sasl_passwd + mode: 0600 +- shell: | + sudo postmap /etc/postfix/sasl_passwd diff --git a/ansible/roles/mail-client/templates/sasl_passwd b/ansible/roles/mail-client/templates/sasl_passwd new file mode 100644 index 0000000..b883c5c --- /dev/null +++ b/ansible/roles/mail-client/templates/sasl_passwd @@ -0,0 +1 @@ +{{ smarthost }} {{ smarthost_user }}.{{ smarthost_password }} |