mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 13:54:37 +03:00
Use a variable for standardizing kubectl invocation (#8329)
* Add kubectl variable * Replace kubectl usage by kubectl variable in roles * Remove redundant --kubeconfig on kubectl usage * Replace unecessary shell usage with command
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
---
|
||||
- name: Lookup node IP in kubernetes
|
||||
shell: >-
|
||||
{{ bin_dir }}/kubectl get nodes {{ node }}
|
||||
-o jsonpath='{range.status.addresses[?(@.type=="InternalIP")]}{.address}{"\n"}{end}'
|
||||
command: >
|
||||
{{ kubectl }} get nodes {{ node }}
|
||||
-o jsonpath={range.status.addresses[?(@.type=="InternalIP")]}{.address}{"\n"}{end}
|
||||
register: remove_node_ip
|
||||
when:
|
||||
- inventory_hostname in groups['etcd']
|
||||
|
||||
Reference in New Issue
Block a user