mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-01 01:28:11 -03:30
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,6 +1,6 @@
|
||||
---
|
||||
- name: Macvlan | Retrieve Pod Cidr
|
||||
command: "{{ bin_dir }}/kubectl get nodes {{ kube_override_hostname | default(inventory_hostname) }} -o jsonpath='{.spec.podCIDR}'"
|
||||
command: "{{ kubectl }} get nodes {{ kube_override_hostname | default(inventory_hostname) }} -o jsonpath='{.spec.podCIDR}'"
|
||||
changed_when: false
|
||||
register: node_pod_cidr_cmd
|
||||
delegate_to: "{{ groups['kube_control_plane'][0] }}"
|
||||
|
||||
Reference in New Issue
Block a user