move node selection from --limit to --extra-vars=node<nodename>"
parent
e24f888bc4
commit
b548f6f320
|
@ -5,7 +5,7 @@
|
||||||
ansible_ssh_pipelining: true
|
ansible_ssh_pipelining: true
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
|
|
||||||
- hosts: etcd:k8s-cluster:vault:calico-rr
|
- hosts: "{{ node | default('etcd:k8s-cluster:vault:calico-rr') }}"
|
||||||
vars_prompt:
|
vars_prompt:
|
||||||
name: "delete_nodes_confirmation"
|
name: "delete_nodes_confirmation"
|
||||||
prompt: "Are you sure you want to delete nodes state? Type 'yes' to delete nodes."
|
prompt: "Are you sure you want to delete nodes state? Type 'yes' to delete nodes."
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
roles:
|
roles:
|
||||||
- { role: remove-node/pre-remove, tags: pre-remove }
|
- { role: remove-node/pre-remove, tags: pre-remove }
|
||||||
|
|
||||||
- hosts: kube-node
|
- hosts: "{{ node | default('kube-node') }}"
|
||||||
roles:
|
roles:
|
||||||
- { role: kubespray-defaults }
|
- { role: kubespray-defaults }
|
||||||
- { role: reset, tags: reset }
|
- { role: reset, tags: reset }
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
- name: Delete node
|
- name: Delete node
|
||||||
command: kubectl delete node {{ item }}
|
command: kubectl delete node {{ item }}
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ groups['kube-node'] }}"
|
- "{{ node.split(',') | default(groups['kube-node']) }}"
|
||||||
delegate_to: "{{ groups['kube-master']|first }}"
|
delegate_to: "{{ groups['kube-master']|first }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
--timeout {{ drain_timeout }}
|
--timeout {{ drain_timeout }}
|
||||||
--delete-local-data {{ item }}
|
--delete-local-data {{ item }}
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ groups['kube-node'] }}"
|
- "{{ node.split(',') | default(groups['kube-node']) }}"
|
||||||
failed_when: false
|
failed_when: false
|
||||||
delegate_to: "{{ groups['kube-master']|first }}"
|
delegate_to: "{{ groups['kube-master']|first }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
|
|
Loading…
Reference in New Issue