Update postfix role
This commit is contained in:
parent
1bd98dd13c
commit
3392556d48
|
@ -1,7 +1,5 @@
|
||||||
# Ansible Role: Postfix
|
# Ansible Role: Postfix
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.org/geerlingguy/ansible-role-postfix.svg?branch=master)](https://travis-ci.org/geerlingguy/ansible-role-postfix)
|
|
||||||
|
|
||||||
Installs postfix on RedHat/CentOS, Gentoo or Debian/Ubuntu.
|
Installs postfix on RedHat/CentOS, Gentoo or Debian/Ubuntu.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
|
@ -17,6 +17,16 @@
|
||||||
when: alias_email != "root" and 'mail_server' not in group_names
|
when: alias_email != "root" and 'mail_server' not in group_names
|
||||||
notify: update aliases
|
notify: update aliases
|
||||||
|
|
||||||
|
- name: Update mailname file.
|
||||||
|
copy:
|
||||||
|
dest: "/etc/mailname"
|
||||||
|
content: "{{ inventory_hostname }}\n"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0644
|
||||||
|
when: ansible_distribution == 'Debian' and 'mail_server' not in group_names
|
||||||
|
notify: update aliases
|
||||||
|
|
||||||
- name: Update Postfix configuration.
|
- name: Update Postfix configuration.
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: "{{ postfix_config_file }}"
|
dest: "{{ postfix_config_file }}"
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# Ansible Role tests
|
|
||||||
|
|
||||||
To run the test playbook(s) in this directory:
|
|
||||||
|
|
||||||
1. Install and start Docker.
|
|
||||||
1. Download the test shim (see .travis.yml file for the URL) into `tests/test.sh`:
|
|
||||||
- `wget -O tests/test.sh https://gist.githubusercontent.com/geerlingguy/73ef1e5ee45d8694570f334be385e181/raw/`
|
|
||||||
1. Make the test shim executable: `chmod +x tests/test.sh`.
|
|
||||||
1. Run (from the role root directory) `distro=[distro] playbook=[playbook] ./tests/test.sh`
|
|
||||||
|
|
||||||
If you don't want the container to be automatically deleted after the test playbook is run, add the following environment variables: `cleanup=false container_id=$(date +%s)`
|
|
|
@ -1,15 +0,0 @@
|
||||||
---
|
|
||||||
- hosts: all
|
|
||||||
|
|
||||||
pre_tasks:
|
|
||||||
- name: Update apt cache.
|
|
||||||
apt: update_cache=yes cache_valid_time=600
|
|
||||||
when: ansible_os_family == 'Debian'
|
|
||||||
|
|
||||||
- name: Override postfix_inet_protocols (RHEL).
|
|
||||||
set_fact:
|
|
||||||
postfix_inet_protocols: ipv4
|
|
||||||
when: ansible_os_family == 'RedHat'
|
|
||||||
|
|
||||||
roles:
|
|
||||||
- role_under_test
|
|
Loading…
Reference in a new issue