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:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: Kubernetes Apps | Register coredns deployment annotation `createdby`
|
||||
shell: "{{ bin_dir }}/kubectl get deploy -n kube-system coredns -o jsonpath='{ .spec.template.metadata.annotations.createdby }'"
|
||||
command: "{{ kubectl }} get deploy -n kube-system coredns -o jsonpath='{ .spec.template.metadata.annotations.createdby }'"
|
||||
register: createdby_annotation
|
||||
changed_when: false
|
||||
ignore_errors: true # noqa ignore-errors
|
||||
|
||||
Reference in New Issue
Block a user