apply calico bgp peer definition task to all nodes, but delegate to (#8974)

first control plane node
This commit is contained in:
orange-llajeanne 2022-06-25 04:42:57 +02:00 committed by GitHub
parent ca212c08de
commit b33896844e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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