Register missing outputs in role "remove-node" (#6856)

This commit is contained in:
Mikhail Snetkov 2020-10-29 02:55:56 +07:00 committed by GitHub
parent 12ab8b7af3
commit c25d624524
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,6 +4,7 @@
{{ bin_dir }}/kubectl cordon {{ hostvars[item]['kube_override_hostname']|default(item) }} {{ bin_dir }}/kubectl cordon {{ hostvars[item]['kube_override_hostname']|default(item) }}
with_items: with_items:
- "{{ node.split(',') | default(groups['kube-node']) }}" - "{{ node.split(',') | default(groups['kube-node']) }}"
register: result
failed_when: result.rc == 0 and not allow_ungraceful_removal failed_when: result.rc == 0 and not allow_ungraceful_removal
delegate_to: "{{ groups['kube-master']|first }}" delegate_to: "{{ groups['kube-master']|first }}"
run_once: true run_once: true
@ -19,6 +20,7 @@
--delete-local-data {{ hostvars[item]['kube_override_hostname']|default(item) }} --delete-local-data {{ hostvars[item]['kube_override_hostname']|default(item) }}
with_items: with_items:
- "{{ node.split(',') | default(groups['kube-node']) }}" - "{{ node.split(',') | default(groups['kube-node']) }}"
register: result
failed_when: result.rc == 0 and not allow_ungraceful_removal failed_when: result.rc == 0 and not allow_ungraceful_removal
delegate_to: "{{ groups['kube-master']|first }}" delegate_to: "{{ groups['kube-master']|first }}"
run_once: true run_once: true