Check if config changed
parent
37ed1b7b8d
commit
1a3a8194a4
|
@ -33,11 +33,21 @@
|
||||||
register: upgrade_result
|
register: upgrade_result
|
||||||
changed_when: upgrade_result.rc == 0 and "Upgrade success" in upgrade_result.stdout and not "Already uptodate" in upgrade_result.stdout
|
changed_when: upgrade_result.rc == 0 and "Upgrade success" in upgrade_result.stdout and not "Already uptodate" in upgrade_result.stdout
|
||||||
|
|
||||||
- name: Enable acme.sh logs
|
- name: Hash config file
|
||||||
become: yes
|
become: yes
|
||||||
command:
|
command:
|
||||||
cmd: ./acme.sh --update-account --log /root/.acme.sh/acme.sh.log
|
|
||||||
chdir: ~/.acme.sh
|
chdir: ~/.acme.sh
|
||||||
|
cmd: sha1sum account.conf
|
||||||
|
register: _account_conf_hash_before
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
- name: Enable acme.sh logs
|
||||||
|
become: yes
|
||||||
|
shell:
|
||||||
|
cmd: ./acme.sh --update-account --log /root/.acme.sh/acme.sh.log && sha1sum account.conf
|
||||||
|
chdir: ~/.acme.sh
|
||||||
|
register: _account_conf_update
|
||||||
|
changed_when: '_account_conf_hash_before.stdout not in _account_conf_update.stdout'
|
||||||
|
|
||||||
- name: Issue certificates
|
- name: Issue certificates
|
||||||
become: yes
|
become: yes
|
||||||
|
|
Loading…
Reference in New Issue