Created
February 7, 2016 16:50
-
-
Save greenhat/b74e26e61f672fd8f337 to your computer and use it in GitHub Desktop.
Ansible playbook for setting up Postfix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: set debconf defaults before postfix install | |
shell: debconf-set-selections <<< "postfix postfix/mailname string {{ hostname }}" executable=/bin/bash | |
sudo: yes | |
tags: postfix | |
- name: set debconf defaults before postfix install | |
shell: debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'" executable=/bin/bash | |
sudo: yes | |
tags: postfix | |
- name: install postfix | |
apt: pkg=postfix state=present | |
sudo: yes | |
tags: postfix | |
- name: forward all root mail to {{ email_forward }} | |
shell: echo "{{ email_forward }}" > /root/.forward | |
sudo: yes | |
notify: restart postfix | |
tags: postfix |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment