Missing vars check.

This commit is contained in:
Lucas Maurice 2021-01-11 18:20:08 -05:00 committed by GitHub
parent 131a0b336f
commit 0f16f23770
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -83,6 +83,8 @@
when:
- not item.remove | default(false)
- acme_cloudflare_token is defined
- acme_cloudflare_account_id is not defined
- acme_cloudflare_zone_id is not defined
loop: "{{ acme_sh_domains }}"
register: issue_result2
changed_when: issue_result2.rc == 0 and "Cert success" in issue_result2.stdout
@ -94,7 +96,8 @@
issue_result: "{{ issue_result2 }}"
when:
- acme_cloudflare_token is defined
- acme_cloudflare_email is defined
- acme_cloudflare_account_id is not defined
- acme_cloudflare_zone_id is not defined
# Install the new certificates
- name: Install acme.sh certificate(s)