From 5d822ad8cb10ba03276218d2a473d19551886bb8 Mon Sep 17 00:00:00 2001 From: Ricky Kwan Date: Mon, 19 Feb 2024 05:58:11 -0500 Subject: [PATCH] Support overriding cni directory owner (#10929) --- roles/network_plugin/cni/defaults/main.yml | 2 ++ roles/network_plugin/cni/tasks/main.yml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 roles/network_plugin/cni/defaults/main.yml diff --git a/roles/network_plugin/cni/defaults/main.yml b/roles/network_plugin/cni/defaults/main.yml new file mode 100644 index 000000000..5d11edfa3 --- /dev/null +++ b/roles/network_plugin/cni/defaults/main.yml @@ -0,0 +1,2 @@ +--- +cni_bin_owner: "{{ kube_owner }}" diff --git a/roles/network_plugin/cni/tasks/main.yml b/roles/network_plugin/cni/tasks/main.yml index d74f169c6..bcab4efb9 100644 --- a/roles/network_plugin/cni/tasks/main.yml +++ b/roles/network_plugin/cni/tasks/main.yml @@ -4,7 +4,7 @@ path: /opt/cni/bin state: directory mode: 0755 - owner: "{{ kube_owner }}" + owner: "{{ cni_bin_owner }}" recurse: true - name: CNI | Copy cni plugins @@ -12,5 +12,5 @@ src: "{{ downloads.cni.dest }}" dest: "/opt/cni/bin" mode: 0755 - owner: "{{ kube_owner }}" + owner: "{{ cni_bin_owner }}" remote_src: yes