Fix check for node-NODEID certs existence

Fixes upgrade from pre-individual node cert envs.
This commit is contained in:
Matthew Mosesohn 2017-02-07 21:06:48 +03:00
parent 491074aab1
commit e5779ab786
2 changed files with 2 additions and 0 deletions

View file

@ -43,6 +43,7 @@
{% for host in all_etcd_hosts %} {% for host in all_etcd_hosts %}
{% if host == inventory_hostname %} {% if host == inventory_hostname %}
{% if (not etcdcert.results[0].stat.exists|default(False)) or {% if (not etcdcert.results[0].stat.exists|default(False)) or
(not etcdcert.results[1].stat.exists|default(False)) or
(etcdcert.results[1].stat.checksum|default('') != etcdcert_master.results[loop.index].stat.checksum|default('')) -%} (etcdcert.results[1].stat.checksum|default('') != etcdcert_master.results[loop.index].stat.checksum|default('')) -%}
{%- set _ = certs.update({'sync': True}) -%} {%- set _ = certs.update({'sync': True}) -%}
{% endif %} {% endif %}

View file

@ -41,6 +41,7 @@
{%- for host in groups['k8s-cluster'] %} {%- for host in groups['k8s-cluster'] %}
{% if host == inventory_hostname %} {% if host == inventory_hostname %}
{% if (not kubecert.results[0].stat.exists|default(False)) or {% if (not kubecert.results[0].stat.exists|default(False)) or
(not kubecert.results[1].stat.exists|default(False)) or
(kubecert.results[1].stat.checksum|default('') != kubecert_master.results[loop.index].stat.checksum|default('')) -%} (kubecert.results[1].stat.checksum|default('') != kubecert_master.results[loop.index].stat.checksum|default('')) -%}
{%- set _ = certs.update({'sync': True}) -%} {%- set _ = certs.update({'sync': True}) -%}
{% endif %} {% endif %}