Merge pull request #247 from paulczar/check_certs_defaults
Fix issue with check_certs playbookpull/251/head
commit
d9dca20d7f
|
@ -20,7 +20,7 @@
|
||||||
- name: "Check certs | check if a cert already exists"
|
- name: "Check certs | check if a cert already exists"
|
||||||
stat:
|
stat:
|
||||||
path: "{{ kube_cert_dir }}/ca.pem"
|
path: "{{ kube_cert_dir }}/ca.pem"
|
||||||
register: kubecert
|
register: kubecert
|
||||||
|
|
||||||
- name: "Check_certs | Set 'sync_certs' to true"
|
- name: "Check_certs | Set 'sync_certs' to true"
|
||||||
set_fact:
|
set_fact:
|
||||||
|
@ -28,8 +28,8 @@
|
||||||
when: >-
|
when: >-
|
||||||
{%- set certs = {'sync': False} -%}
|
{%- set certs = {'sync': False} -%}
|
||||||
{%- for server in play_hosts
|
{%- for server in play_hosts
|
||||||
if (not hostvars[server].kubecert.stat.exists) or
|
if (not hostvars[server].kubecert.stat.exists|default(False)) or
|
||||||
(hostvars[server].kubecert.stat.checksum != kubecert_master.stat.checksum|default('')) -%}
|
(hostvars[server].kubecert.stat.checksum|default('') != kubecert_master.stat.checksum|default('')) -%}
|
||||||
{%- set _ = certs.update({'sync': True}) -%}
|
{%- set _ = certs.update({'sync': True}) -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{{ certs.sync }}
|
{{ certs.sync }}
|
||||||
|
|
Loading…
Reference in New Issue