Remove --limit option to select node to delete (#4001)
--limit doesn't work when using remove-node.yml as there is group listing with "hosts: kube-master" in the playbook. Thus, remove-node/pre-remove/post-remove tasks are skipped as they are filtered by group "hosts: kube-master"
This commit is contained in:
parent
4d5b41b8db
commit
2c8d75afb7
1 changed files with 1 additions and 11 deletions
|
@ -56,22 +56,12 @@ Add worker nodes to the list under kube-node if you want to delete them (or util
|
||||||
ansible-playbook -i inventory/mycluster/hosts.ini remove-node.yml -b -v \
|
ansible-playbook -i inventory/mycluster/hosts.ini remove-node.yml -b -v \
|
||||||
--private-key=~/.ssh/private_key
|
--private-key=~/.ssh/private_key
|
||||||
|
|
||||||
|
Use `--extra-vars "node=<nodename>,<nodename2>"` to select the node you want to delete.
|
||||||
We support two ways to select the nodes:
|
|
||||||
|
|
||||||
- Use `--extra-vars "node=<nodename>,<nodename2>"` to select the node you want to delete.
|
|
||||||
```
|
```
|
||||||
ansible-playbook -i inventory/mycluster/hosts.ini remove-node.yml -b -v \
|
ansible-playbook -i inventory/mycluster/hosts.ini remove-node.yml -b -v \
|
||||||
--private-key=~/.ssh/private_key \
|
--private-key=~/.ssh/private_key \
|
||||||
--extra-vars "node=nodename,nodename2"
|
--extra-vars "node=nodename,nodename2"
|
||||||
```
|
```
|
||||||
or
|
|
||||||
- Use `--limit nodename,nodename2` to select the node
|
|
||||||
```
|
|
||||||
ansible-playbook -i inventory/mycluster/hosts.ini remove-node.yml -b -v \
|
|
||||||
--private-key=~/.ssh/private_key \
|
|
||||||
--limit nodename,nodename2"
|
|
||||||
```
|
|
||||||
|
|
||||||
Connecting to Kubernetes
|
Connecting to Kubernetes
|
||||||
------------------------
|
------------------------
|
||||||
|
|
Loading…
Reference in a new issue