Use role to copy CNI bin (#5953)

This commit is contained in:
Maxime Guyot
2020-04-16 19:06:45 +02:00
committed by GitHub
parent 065292f8a4
commit 0924c2510c
17 changed files with 22 additions and 136 deletions

View File

@@ -0,0 +1,3 @@
---
dependencies:
- role: network_plugin/cni

View File

@@ -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