mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 09:39:12 +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:
@@ -4,7 +4,7 @@
|
||||
- needs_cordoning|default(false)
|
||||
- kube_network_plugin == 'cilium'
|
||||
command: >
|
||||
{{ bin_dir }}/kubectl --kubeconfig {{ kube_config_dir }}/admin.conf
|
||||
{{ kubectl }}
|
||||
wait pod -n kube-system -l k8s-app=cilium
|
||||
--field-selector 'spec.nodeName=={{ kube_override_hostname|default(inventory_hostname) }}'
|
||||
--for=condition=Ready
|
||||
@@ -12,7 +12,7 @@
|
||||
delegate_to: "{{ groups['kube_control_plane'][0] }}"
|
||||
|
||||
- name: Uncordon node
|
||||
command: "{{ bin_dir }}/kubectl --kubeconfig {{ kube_config_dir }}/admin.conf uncordon {{ kube_override_hostname|default(inventory_hostname) }}"
|
||||
command: "{{ kubectl }} uncordon {{ kube_override_hostname|default(inventory_hostname) }}"
|
||||
delegate_to: "{{ groups['kube_control_plane'][0] }}"
|
||||
when:
|
||||
- needs_cordoning|default(false)
|
||||
|
||||
Reference in New Issue
Block a user