From 4d783fff0d40565f5494ca34b2be8168583e529b Mon Sep 17 00:00:00 2001 From: Jonathan Craig Date: Thu, 16 Aug 2018 23:31:21 -0400 Subject: [PATCH] resolve issues with new cacert feature --- roles/kubernetes/node/tasks/main.yml | 14 ++++++++++++++ roles/kubernetes/preinstall/tasks/main.yml | 14 -------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/roles/kubernetes/node/tasks/main.yml b/roles/kubernetes/node/tasks/main.yml index 7f807ceeb..26081a1cf 100644 --- a/roles/kubernetes/node/tasks/main.yml +++ b/roles/kubernetes/node/tasks/main.yml @@ -157,6 +157,20 @@ - cloud-provider - facts +- name: Write cacert file + copy: + src: "{{ openstack_cacert }}" + dest: "{{ kube_config_dir }}/openstack-cacert.pem" + group: "{{ kube_cert_group }}" + mode: 0640 + when: + - inventory_hostname in groups['k8s-cluster'] + - cloud_provider is defined + - cloud_provider in [ 'openstack', 'azure', 'vsphere' ] + - openstack_cacert is defined + tags: + - cloud-provider + - name: Write cloud-config template: src: "{{ cloud_provider }}-cloud-config.j2" diff --git a/roles/kubernetes/preinstall/tasks/main.yml b/roles/kubernetes/preinstall/tasks/main.yml index 4db366ced..75fafaf56 100644 --- a/roles/kubernetes/preinstall/tasks/main.yml +++ b/roles/kubernetes/preinstall/tasks/main.yml @@ -311,17 +311,3 @@ - ansible_distribution in ["CentOS","RedHat"] tags: - bootstrap-os - -- name: Write cacert file - copy: - content: "{{ openstack_cacert }}" - dest: "{{ kube_config_dir }}/openstack-cacert.pem" - group: "{{ kube_cert_group }}" - mode: 0640 - when: - - inventory_hostname in groups['k8s-cluster'] - - cloud_provider is defined - - cloud_provider in [ 'openstack', 'azure', 'vsphere' ] - - openstack_cacert is defined - tags: - - cloud-provider