mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-19 20:20:10 -03:30
Use role to copy CNI bin (#5953)
This commit is contained in:
3
roles/network_plugin/macvlan/meta/main.yml
Normal file
3
roles/network_plugin/macvlan/meta/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
dependencies:
|
||||
- role: network_plugin/cni
|
||||
@@ -1,20 +1,4 @@
|
||||
---
|
||||
|
||||
- name: Macvlan | Set cni directory permissions
|
||||
file:
|
||||
path: /opt/cni/bin
|
||||
state: directory
|
||||
owner: kube
|
||||
recurse: true
|
||||
mode: 0755
|
||||
|
||||
- name: Macvlan | Copy cni plugins
|
||||
unarchive:
|
||||
src: "{{ local_release_dir }}/cni-plugins-linux-{{ image_arch }}-{{ cni_version }}.tgz"
|
||||
dest: "/opt/cni/bin"
|
||||
mode: 0755
|
||||
remote_src: yes
|
||||
|
||||
- name: Macvlan | Retrieve Pod Cidr
|
||||
command: "{{ bin_dir }}/kubectl get nodes {{ kube_override_hostname | default(inventory_hostname) }} -o jsonpath='{.spec.podCIDR}'"
|
||||
register: node_pod_cidr_cmd
|
||||
|
||||
Reference in New Issue
Block a user