library/roles/letsencrypt-acmetool-client/tasks/main.yml: More fixes to the tasks and the scripts. It now works correctly against haproxy.
This commit is contained in:
parent
bbe5258949
commit
908e7adce4
|
@ -7,6 +7,7 @@ HAPROXY_CERTDIR=/etc/pki/certs
|
||||||
HAPROXY_CERTFILE=$HAPROXY_CERTDIR/haproxy.pem
|
HAPROXY_CERTFILE=$HAPROXY_CERTDIR/haproxy.pem
|
||||||
DATE=$( date )
|
DATE=$( date )
|
||||||
|
|
||||||
|
[ ! -d $HAPROXY_CERTDIR ] && mkdir -p $HAPROXY_CERTDIR
|
||||||
[ ! -d $LE_LOG_DIR ] && mkdir $LE_LOG_DIR
|
[ ! -d $LE_LOG_DIR ] && mkdir $LE_LOG_DIR
|
||||||
echo "$DATE" >> $LE_LOG_DIR/haproxy.log
|
echo "$DATE" >> $LE_LOG_DIR/haproxy.log
|
||||||
|
|
||||||
|
|
|
@ -89,8 +89,13 @@
|
||||||
when: letsencrypt_acme_install
|
when: letsencrypt_acme_install
|
||||||
tags: letsencrypt
|
tags: letsencrypt
|
||||||
|
|
||||||
|
- name: Create a directory where to put the cron job and hooks logs
|
||||||
|
file: dest={{ letsencrypt_acme_log_dir }} state=directory owner={{ letsencrypt_acme_user }} group={{ letsencrypt_acme_user }} mode=0750
|
||||||
|
when: letsencrypt_acme_install
|
||||||
|
tags: letsencrypt
|
||||||
|
|
||||||
- name: Install a daily cron job to renew the certificates when needed
|
- name: Install a daily cron job to renew the certificates when needed
|
||||||
cron: name="Letsencrypt certificate renewal" special_time=daily job="{{ letsencrypt_acme_command }} {{ letsencrypt_acme_command_opts }} reconcile" user={{ letsencrypt_acme_user }}
|
cron: name="Letsencrypt certificate renewal" special_time=daily job="{{ letsencrypt_acme_command }} {{ letsencrypt_acme_command_opts }} reconcile > {{ letsencrypt_acme_log_dir }}/acme-cron.log 2>&1" user={{ letsencrypt_acme_user }}
|
||||||
when: letsencrypt_acme_install
|
when: letsencrypt_acme_install
|
||||||
tags: letsencrypt
|
tags: letsencrypt
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue