diff --git a/tasks/haproxy_ssl_key_distribute.yml b/tasks/haproxy_ssl_key_distribute.yml index 55beb6b..3bbf8bd 100644 --- a/tasks/haproxy_ssl_key_distribute.yml +++ b/tasks/haproxy_ssl_key_distribute.yml @@ -18,6 +18,7 @@ dest: "{{ haproxy_ssl_key }}" content: "{{ hostvars[groups['haproxy_all'][0]]['haproxy_ssl_key_fact'] | b64decode }}" mode: "0640" + when: hostvars[groups['haproxy_all'][0]]['haproxy_ssl_key_fact'] is defined notify: - regen pem tags: @@ -28,6 +29,7 @@ dest: "{{ haproxy_ssl_cert }}" content: "{{ hostvars[groups['haproxy_all'][0]]['haproxy_ssl_cert_fact'] | b64decode }}" mode: "0640" + when: hostvars[groups['haproxy_all'][0]]['haproxy_ssl_cert_fact'] is defined notify: - regen pem tags: