Idempotency fixes to roles/pre-upgrade (#3497)

This commit is contained in:
Giacomo Longo 2018-11-08 01:31:29 +01:00 committed by k8s-ci-robot
parent a6932b6b81
commit 9f7c2b08a5

View file

@ -8,6 +8,7 @@
register: kubectl_node_ready
delegate_to: "{{ groups['kube-master'][0] }}"
failed_when: false
changed_when: false
# SchedulingDisabled: unschedulable = true
# else unschedulable key doesn't exist
@ -18,6 +19,7 @@
register: kubectl_node_schedulable
delegate_to: "{{ groups['kube-master'][0] }}"
failed_when: false
changed_when: false
- set_fact:
needs_cordoning: >-
@ -37,6 +39,7 @@
register: kubectl_version
delegate_to: "{{ groups['kube-master'][0] }}"
run_once: yes
changed_when: false
when:
- drain_nodes
- needs_cordoning