From b33896844edb2a3c2ce11967d91c0a3aafda5ec9 Mon Sep 17 00:00:00 2001 From: orange-llajeanne <71634751+orange-llajeanne@users.noreply.github.com> Date: Sat, 25 Jun 2022 04:42:57 +0200 Subject: [PATCH] apply calico bgp peer definition task to all nodes, but delegate to (#8974) first control plane node --- roles/network_plugin/calico/tasks/install.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/network_plugin/calico/tasks/install.yml b/roles/network_plugin/calico/tasks/install.yml index a8b1267eb..f543036e5 100644 --- a/roles/network_plugin/calico/tasks/install.yml +++ b/roles/network_plugin/calico/tasks/install.yml @@ -569,9 +569,10 @@ delay: "{{ retry_stagger | random + 3 }}" with_items: - "{{ peers|selectattr('scope','undefined')|list|default([]) | union(peers|selectattr('scope','defined')|selectattr('scope','equalto', 'node')|list|default([])) }}" + delegate_to: "{{ groups['kube_control_plane'][0] }}" when: - peer_with_router|default(false) - - inventory_hostname == groups['kube_control_plane'][0] + - inventory_hostname in groups['k8s_cluster'] - name: Calico | Create Calico ipam manifests template: