diff --git a/roles/network_plugin/calico/tasks/install.yml b/roles/network_plugin/calico/tasks/install.yml index adbb29594e5..5df4ee2b12f 100644 --- a/roles/network_plugin/calico/tasks/install.yml +++ b/roles/network_plugin/calico/tasks/install.yml @@ -123,9 +123,16 @@ - enable_dual_stack_networks - block: + - name: Calico | Check if extra directory is needed + stat: + path: "{{ local_release_dir }}/calico-{{ calico_version }}-kdd-crds/kdd" + register: kdd_path + - name: Calico | Set kdd path + set_fact: + calico_kdd_path: "{{ local_release_dir }}/calico-{{ calico_version }}-kdd-crds{{ '/kdd' if kdd_path.stat.exists is defined and kdd_path.stat.exists }}" - name: Calico | Create calico manifests for kdd assemble: - src: "{{ local_release_dir }}/calico-{{ calico_version }}-kdd-crds" + src: "{{ calico_kdd_path }}" dest: "{{ kube_config_dir }}/kdd-crds.yml" mode: 0644 delimiter: "---\n"