fix indentation
Some checks failed
the build failed

This commit is contained in:
Robert Kaussow 2019-01-09 20:53:40 +01:00
parent f699abe9f2
commit 89a8bc0fc3
2 changed files with 54 additions and 52 deletions

View File

@ -1,3 +1,4 @@
# Standards: 0.1
--- ---
galaxy_info: galaxy_info:
author: xoxys author: xoxys
@ -5,9 +6,9 @@ galaxy_info:
license: MIT license: MIT
min_ansible_version: 2.4 min_ansible_version: 2.4
platforms: platforms:
- name: EL - name: EL
versions: versions:
- 7 - 7
galaxy_tags: galaxy_tags:
- postfix - postfix
- relay - relay

View File

@ -1,60 +1,61 @@
--- ---
- name: Setup postfix - name: Setup postfix
block: block:
- name: Configure postfix - name: Configure postfix
template: template:
src: etc/postfix/main.cf.j2 src: etc/postfix/main.cf.j2
dest: /etc/postfix/main.cf dest: /etc/postfix/main.cf
owner: root owner: root
group: root group: root
mode: 0644 mode: 0644
notify: postfix_restart notify: postfix_restart
- name: Create sasl - name: Create sasl
template: template:
src: etc/postfix/sasl_passwd.j2 src: etc/postfix/sasl_passwd.j2
dest: /etc/postfix/sasl_passwd dest: /etc/postfix/sasl_passwd
owner: root owner: root
group: root group: root
mode: 0600 mode: 0600
register: sasl_result register: sasl_result
- name: Ensure sasl_passwd.db exist - name: Ensure sasl_passwd.db exist
stat: stat:
path: /etc/postfix/sasl_passwd.db path: /etc/postfix/sasl_passwd.db
register: sasldb register: sasldb
- name: Create sasl_passwd.db - name: Create sasl_passwd.db
command: /usr/sbin/postmap hash:/etc/postfix/sasl_passwd command: /usr/sbin/postmap hash:/etc/postfix/sasl_passwd
when: not sasldb.stat.exists or sasl_result.changed when: not sasldb.stat.exists or sasl_result.changed
register: sasldb_update register: sasldb_update
notify: postfix_restart notify: postfix_restart
- name: Set permissions for sasl_passwd.db - name: Set permissions for sasl_passwd.db
file: file:
path: /etc/postfix/sasl_passwd.db path: /etc/postfix/sasl_passwd.db
owner: root owner: root
group: root group: root
mode: 0600 mode: 0600
notify: postfix_restart notify: postfix_restart
- name: Override outgoing header - name: Override outgoing header
template: template:
src: etc/postfix/sender_canonical.j2 src: etc/postfix/sender_canonical.j2
dest: /etc/postfix/sender_canonical dest: /etc/postfix/sender_canonical
owner: root owner: root
group: root group: root
mode: 0600 mode: 0600
register: sender_result register: sender_result
- name: Ensure sender_canonical.db exist - name: Ensure sender_canonical.db exist
stat: stat:
path: /etc/postfix/sender_canonical.db path: /etc/postfix/sender_canonical.db
register: senderdb register: senderdb
- name: Hash sender_canoncial - name: Hash sender_canoncial
command: "/usr/sbin/postmap hash:/etc/postfix/sender_canonical" command: "/usr/sbin/postmap hash:/etc/postfix/sender_canonical"
when: not senderdb.stat.exists or sender_result.changed when: not senderdb.stat.exists or sender_result.changed
register: senderdb_update register: senderdb_update
notify: postfix_restart notify: postfix_restart
become: True become: True
become_user: root