Merge branch 'master' of adellam/ansible-roles into master

This commit is contained in:
Andrea Dell'Amico 2020-02-07 16:30:40 +01:00 committed by Gitea
commit 7356df8c0b
3 changed files with 22 additions and 8 deletions

View File

@ -1,4 +1,8 @@
---
- name: Create the acme hooks directory if it does not exist
file: dest=/usr/lib/acme/hooks state=directory
tags: [ 'postfix', 'postfix-relay', 'postfix_letsencrypt', 'letsencrypt' ]
- name: Install a hook for letsencrypt
template: src=postfix-letsencrypt-hook dest=/usr/lib/acme/hooks/postfix owner=root group=root mode=4555
tags: [ 'postfix', 'postfix-relay' ]
tags: [ 'postfix', 'postfix-relay', 'postfix_letsencrypt', 'letsencrypt' ]

View File

@ -1,8 +1,18 @@
---
- name: Create the acme hooks directory if it does not exist
file: dest=/usr/lib/acme/hooks/postfix state=directory
tags: [ 'postfix', 'postfix-relay', 'letsencrypt' ]
- name: Manage the letsencrypt hook for postfix
block:
- name: Create the acme hooks directory if it does not exist
file: dest=/usr/lib/acme/hooks state=directory
- name: Install a hook for letsencrypt
template: src=postfix-letsencrypt-hook dest=/usr/lib/acme/hooks/postfix owner=root group=root mode=4555
tags: [ 'postfix', 'postfix-relay', 'letsencrypt' ]
- name: In the past we created a directory instead of a file. Check if it's the case
stat: path=/usr/lib/acme/hooks/postfix
register: postfix_hookdir
- name: Remove the wrong directory if it's present
file: dest=/usr/lib/acme/hooks/postfix state=absent
when: postfix_hookdir.stat.isdir is defined and postfix_hookdir.stat.isdir
- name: Install a hook for letsencrypt
template: src=postfix-letsencrypt-hook dest=/usr/lib/acme/hooks/postfix owner=root group=root mode=0555
tags: [ 'postfix', 'postfix_letsencrypt', 'letsencrypt' ]

View File

@ -1,7 +1,7 @@
---
- name: Write sasl hash file
template: src=sasl_passwd.j2 dest=/etc/postfix/sasl_passwd owner=root group=root mode=0400
when: postfix_use_sasl_auth
when: postfix_use_sasl_auth | bool
register: update_sasl_hash
tags: postfix-relay