diff --git a/roles/kubernetes/master/tasks/static-pod-setup.yml b/roles/kubernetes/master/tasks/static-pod-setup.yml index d20557e95..32ac5c2cb 100644 --- a/roles/kubernetes/master/tasks/static-pod-setup.yml +++ b/roles/kubernetes/master/tasks/static-pod-setup.yml @@ -17,7 +17,7 @@ - name: Check if kube system namespace exists command: "{{ bin_dir }}/kubectl get ns {{system_namespace}}" - register: 'kubesystem' + register: check_system_ns changed_when: False failed_when: False when: inventory_hostname == groups['kube-master'][0] @@ -30,7 +30,7 @@ register: create_system_ns until: create_system_ns.rc == 0 changed_when: False - when: kubesystem.rc != 0 and inventory_hostname == groups['kube-master'][0] + when: inventory_hostname == groups['kube-master'][0] and check_system_ns|failed tags: apps - name: Write kube-scheduler kubeconfig