Only create kubeadm compat cert dir link if it does not exist (#4840)

This commit is contained in:
Andreas Krüger 2019-06-05 10:27:53 +02:00 committed by Kubernetes Prow Robot
parent 07cb8ebef7
commit 797bfd85b0

View file

@ -23,6 +23,14 @@
- "{{ kube_manifest_dir }}" - "{{ kube_manifest_dir }}"
- "{{ kube_script_dir }}" - "{{ kube_script_dir }}"
- name: Check if kubernetes kubeadm compat cert dir exists
stat:
path: "{{ kube_cert_compat_dir }}"
register: kube_cert_compat_dir_check
when:
- inventory_hostname in groups['k8s-cluster']
- kube_cert_dir != kube_cert_compat_dir
- name: Create kubernetes kubeadm compat cert dir (kubernetes/kubeadm issue 1498) - name: Create kubernetes kubeadm compat cert dir (kubernetes/kubeadm issue 1498)
file: file:
src: "{{ kube_cert_dir }}" src: "{{ kube_cert_dir }}"
@ -31,6 +39,7 @@
when: when:
- inventory_hostname in groups['k8s-cluster'] - inventory_hostname in groups['k8s-cluster']
- kube_cert_dir != kube_cert_compat_dir - kube_cert_dir != kube_cert_compat_dir
- not kube_cert_compat_dir_check.stat.exists
- name: Create cni directories - name: Create cni directories
file: file: