Initial commit
This commit is contained in:
30
roles/Postfix_Install/tasks/main.yml
Executable file
30
roles/Postfix_Install/tasks/main.yml
Executable file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
# tasks file for nginx_install
|
||||
- name: Remove Sendmail
|
||||
yum:
|
||||
name: sendmail
|
||||
state: remove
|
||||
- name: Install Postfix
|
||||
yum:
|
||||
name: postfix
|
||||
state: present
|
||||
- name: Replace Domain
|
||||
replace:
|
||||
path: /etc/postfix/main.cf
|
||||
regexp: '\b(localhost)(\d*)\b'
|
||||
replace: 'smtp.gsmc.com'
|
||||
- name: Config Postfix
|
||||
blockinfile:
|
||||
path: /etc/postfix/main.cf
|
||||
block: |
|
||||
mydomain = gsmc.com
|
||||
myorigin = gsmc.com
|
||||
inet_interfaces = all
|
||||
inet_protocols = all
|
||||
mydestination = $myhostname, localhost.$mydomain, localhost
|
||||
mynetworks = 192.168.1.0/24, 127.0.0.0/8
|
||||
home_mailbox = Maildir/
|
||||
- name: Start Nginx
|
||||
systemd:
|
||||
state: started
|
||||
name: postfix
|
||||
Reference in New Issue
Block a user