mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 01:29:42 +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:
@@ -10,8 +10,8 @@
|
||||
- upgrade
|
||||
|
||||
- name: CephFS Provisioner | Remove legacy namespace
|
||||
shell: |
|
||||
{{ bin_dir }}/kubectl delete namespace {{ cephfs_provisioner_namespace }}
|
||||
command: >
|
||||
{{ kubectl }} delete namespace {{ cephfs_provisioner_namespace }}
|
||||
ignore_errors: true # noqa ignore-errors
|
||||
when:
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
@@ -19,8 +19,8 @@
|
||||
- upgrade
|
||||
|
||||
- name: CephFS Provisioner | Remove legacy storageclass
|
||||
shell: |
|
||||
{{ bin_dir }}/kubectl delete storageclass {{ cephfs_provisioner_storage_class }}
|
||||
command: >
|
||||
{{ kubectl }} delete storageclass {{ cephfs_provisioner_storage_class }}
|
||||
ignore_errors: true # noqa ignore-errors
|
||||
when:
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
- upgrade
|
||||
|
||||
- name: RBD Provisioner | Remove legacy namespace
|
||||
shell: |
|
||||
{{ bin_dir }}/kubectl delete namespace {{ rbd_provisioner_namespace }}
|
||||
command: >
|
||||
{{ kubectl }} delete namespace {{ rbd_provisioner_namespace }}
|
||||
ignore_errors: true # noqa ignore-errrors
|
||||
when:
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
@@ -19,8 +19,8 @@
|
||||
- upgrade
|
||||
|
||||
- name: RBD Provisioner | Remove legacy storageclass
|
||||
shell: |
|
||||
{{ bin_dir }}/kubectl delete storageclass {{ rbd_provisioner_storage_class }}
|
||||
command: >
|
||||
{{ kubectl }} delete storageclass {{ rbd_provisioner_storage_class }}
|
||||
ignore_errors: true # noqa ignore-errrors
|
||||
when:
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
|
||||
Reference in New Issue
Block a user