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:
15
roles/network_plugin/ovn4nfv/tasks/main.yml
Normal file
15
roles/network_plugin/ovn4nfv/tasks/main.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
- name: ovn4nfv | Label control-plane node
|
||||
command: >-
|
||||
{{ kubectl }} label --overwrite node {{ groups['kube_control_plane'] | first }} ovn4nfv-k8s-plugin=ovn-control-plane
|
||||
when:
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
|
||||
- name: ovn4nfv | Create ovn4nfv-k8s manifests
|
||||
template:
|
||||
src: "{{ item.file }}.j2"
|
||||
dest: "{{ kube_config_dir }}/{{ item.file }}"
|
||||
with_items:
|
||||
- {name: ovn-daemonset, file: ovn-daemonset.yml}
|
||||
- {name: ovn4nfv-k8s-plugin, file: ovn4nfv-k8s-plugin.yml}
|
||||
register: ovn4nfv_node_manifests
|
||||
Reference in New Issue
Block a user