This repository has been archived by the owner on Nov 22, 2022. It is now read-only.
forked from tdilauro/dataverse-ansible-role
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,6 @@ | |
- VAULT.yaml | ||
vars: | ||
load_mdblocks: true | ||
mail_relay: smtp.johnshopkins.edu | ||
roles: | ||
- role: dataverse |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# -*- mode: yaml -*- | ||
# vi: set ft=yaml : | ||
|
||
--- | ||
|
||
############################################################################### | ||
# install/enable mailer pre-reqs (RedHat/CentOS 7) | ||
############################################################################### | ||
|
||
- name: Ensure postfix is installed (RedHat/CentOS) | ||
yum: name=postfix state=installed | ||
when: ansible_os_family == 'RedHat' | ||
|
||
############################################################################### | ||
# update configuration | ||
############################################################################### | ||
|
||
- name: configure mail relay | ||
lineinfile: | ||
dest: "{{ postfix_main_config_file }}" | ||
state: present | ||
regexp: '^\s*relayhost =' | ||
insertafter: '^\s*#\s*relayhost\s*=' | ||
line: "relayhost = {{ mail_relay }}" | ||
|
||
- name: configure mailer hostname | ||
lineinfile: | ||
dest: "{{ postfix_main_config_file }}" | ||
state: present | ||
regexp: '^\s*myhostname\s*=' | ||
insertafter: '^\s*#\s*myhostname\s*=' | ||
line: "myhostname = {{ inventory_hostname }}" | ||
|
||
############################################################################### | ||
# enable/restart mail server to pick up configuration changes | ||
############################################################################### | ||
|
||
- name: start postfix and enable on system startup | ||
service: name=postfix enabled=yes state=restarted |
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