From d7bd2713c7dc299fb4acd8ba73d8b8f4e87dd75a Mon Sep 17 00:00:00 2001 From: Adrien Waksberg Date: Sat, 7 Jul 2018 09:52:07 +0200 Subject: [PATCH] fix: variable ansible_fqdn --- tasks/certificates.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/certificates.yml b/tasks/certificates.yml index 205ce28..f511981 100644 --- a/tasks/certificates.yml +++ b/tasks/certificates.yml @@ -14,11 +14,11 @@ - name: create a new certificate shell: 'certbot certonly -n --agree-tos -d {{ item.item }} -m {{ certbot_mail }} --webroot --webroot-path {{ certbot_path }} --rsa-key-size {{ certbot_key_size }}' with_items: '{{ st.results }}' - when: (role == 'master' or item.item == ansible_hostname) and not item.stat.exists and ng.stat.exists + when: (role == 'master' or item.item == ansible_fqdn) and not item.stat.exists and ng.stat.exists tags: certbot - name: create a new certificate (standalone) shell: 'certbot certonly -n --agree-tos -d {{ item.item }} -m {{ certbot_mail }} --standalone --rsa-key-size {{ certbot_key_size }}' with_items: '{{ st.results }}' - when: (role == 'master' or item.item == ansible_hostname) and not item.stat.exists and not ng.stat.exists + when: (role == 'master' or item.item == ansible_fqdn) and not item.stat.exists and not ng.stat.exists tags: certbot