forked from ISTI-ansible-roles/ansible-roles
letsencrypt: Run the script that requires the certificates only when the desired file changed.
This commit is contained in:
parent
30169b5998
commit
1648cc50e7
|
@ -79,6 +79,7 @@
|
|||
become_user: '{{ letsencrypt_acme_user }}'
|
||||
template: src=cert-requirements.j2 dest={{ letsencrypt_acme_certsconf_dir }}/{{ ansible_fqdn }} mode=0644
|
||||
when: letsencrypt_acme_install
|
||||
register: letsencrypt_new_desired_file
|
||||
tags: letsencrypt
|
||||
|
||||
- name: Set the cap_net_bind_service capability to the acmetool binary when we use it in listener mode
|
||||
|
@ -132,7 +133,7 @@
|
|||
become: True
|
||||
become_user: '{{ letsencrypt_acme_user }}'
|
||||
shell: '/usr/local/bin/acme-cert-request > {{ letsencrypt_acme_log_dir }}/acme-init.log 2>&1'
|
||||
when: letsencrypt_acme_install
|
||||
when: ( letsencrypt_new_desired_file | changed )
|
||||
ignore_errors: True
|
||||
tags: letsencrypt
|
||||
|
||||
|
|
Loading…
Reference in New Issue