From 012bc49404e47ba067322f93364b4a80170f7e77 Mon Sep 17 00:00:00 2001 From: Matthew Mosesohn Date: Tue, 7 Feb 2017 21:06:48 +0300 Subject: [PATCH] Fix check for node-NODEID certs existence Fixes upgrade from pre-individual node cert envs. --- roles/etcd/tasks/check_certs.yml | 1 + roles/kubernetes/secrets/tasks/check-certs.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/roles/etcd/tasks/check_certs.yml b/roles/etcd/tasks/check_certs.yml index 593dbbe17..270c0abfc 100644 --- a/roles/etcd/tasks/check_certs.yml +++ b/roles/etcd/tasks/check_certs.yml @@ -43,6 +43,7 @@ {% for host in all_etcd_hosts %} {% if host == inventory_hostname %} {% 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('')) -%} {%- set _ = certs.update({'sync': True}) -%} {% endif %} diff --git a/roles/kubernetes/secrets/tasks/check-certs.yml b/roles/kubernetes/secrets/tasks/check-certs.yml index aa3e47754..0d5f23814 100644 --- a/roles/kubernetes/secrets/tasks/check-certs.yml +++ b/roles/kubernetes/secrets/tasks/check-certs.yml @@ -41,6 +41,7 @@ {%- for host in groups['k8s-cluster'] %} {% if host == inventory_hostname %} {% 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('')) -%} {%- set _ = certs.update({'sync': True}) -%} {% endif %}