Skip to content

Instantly share code, notes, and snippets.

@nitanka
Created August 14, 2017 09:42
Show Gist options
  • Save nitanka/96796fc6f1f9e68b5ab00592f2329dca to your computer and use it in GitHub Desktop.
Save nitanka/96796fc6f1f9e68b5ab00592f2329dca to your computer and use it in GitHub Desktop.
Ansible: Installing postfix
---
- name: Installing postfix
hosts: localhost
sudo: yes
tasks:
- name: Set Postfix option hostname
debconf: name=postifx question="postfix/mailname" value="{{ansible_fqdn}}" vtype="string"
- name: Set Postfix option type as internet site
debconf: name=postfix question="postfix/main_mailer_type" value="'Internet Site'" vtype="string"
- name: Install Postfix
apt: package={{ item }} state=installed force=yes update_cache=yes cache_valid_time=3600
with_items:
- postfix
- mailutils
@nitanka
Copy link
Author

nitanka commented Aug 14, 2017

Initial commit, need to test it more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment