diff options
Diffstat (limited to 'ansible/roles/smarthost-client/tasks/main.yml')
-rw-r--r-- | ansible/roles/smarthost-client/tasks/main.yml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ansible/roles/smarthost-client/tasks/main.yml b/ansible/roles/smarthost-client/tasks/main.yml new file mode 100644 index 0000000..899f736 --- /dev/null +++ b/ansible/roles/smarthost-client/tasks/main.yml @@ -0,0 +1,31 @@ +# A mail client needs to send mail. I prefer to send via a local MTA, +# which routes things out via a smarthost. + +- name: install postfix + apt: name=postfix + +- name: configure postfix + template: + src: main.cf + dest: /etc/postfix/main.cf + notify: restart postfix + +- name: set mailname + copy: + content: "{{ mailname }}\n" + dest: /etc/mailname + owner: root + group: root + mode: 0644 + +# Set up the smarthost relay credentials. + +- name: set smarthost relay credentials + template: + src: sasl_passwd + dest: /etc/postfix/sasl_passwd + mode: 0600 + +- name: postmap relay credentials + shell: | + postmap /etc/postfix/sasl_passwd |