Skip to content
Snippets Groups Projects
Unverified Commit 0c8d2946 authored by Ehsan Golpayegani's avatar Ehsan Golpayegani Committed by GitHub
Browse files

make sure peers is defined. (#11259)

* make sure peers is defined.

* Update peer_with_router.yml
parent 351393e3
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
until: output.rc == 0 until: output.rc == 0
delay: "{{ retry_stagger | random + 3 }}" delay: "{{ retry_stagger | random + 3 }}"
with_items: with_items:
- "{{ peers | selectattr('scope', 'defined') | selectattr('scope', 'equalto', 'global') | list | default([]) }}" - "{{ peers | default([]) | selectattr('scope', 'defined') | selectattr('scope', 'equalto', 'global') | list }}"
when: when:
- inventory_hostname == groups['kube_control_plane'][0] - inventory_hostname == groups['kube_control_plane'][0]
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
until: output.rc == 0 until: output.rc == 0
delay: "{{ retry_stagger | random + 3 }}" delay: "{{ retry_stagger | random + 3 }}"
with_items: with_items:
- "{{ peers | selectattr('scope', 'undefined') | list | default([]) | union(peers | selectattr('scope', 'defined') | selectattr('scope', 'equalto', 'node') | list | default([])) }}" - "{{ peers | default([]) | selectattr('scope', 'undefined') | list | union(peers | default([]) | selectattr('scope', 'defined') | selectattr('scope', 'equalto', 'node') | list ) }}"
delegate_to: "{{ groups['kube_control_plane'][0] }}" delegate_to: "{{ groups['kube_control_plane'][0] }}"
when: when:
- inventory_hostname in groups['k8s_cluster'] - inventory_hostname in groups['k8s_cluster']
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment