-
Notifications
You must be signed in to change notification settings - Fork 2
Jd bgp works #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Jd bgp works #81
Changes from all commits
79f9262
9b31299
fc50c72
e2eb9a0
618f017
b65e7a8
b9f6214
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -136,3 +136,37 @@ | |
| with_subelements: | ||
| - "{{ os_networks_security_groups }}" | ||
| - rules | ||
|
|
||
| - name: Ensure BGP Speakers are created | ||
| openstack.cloud.bgp_speaker: | ||
| auth_type: "{{ os_networks_auth_type }}" | ||
|
Check failure on line 142 in roles/os_networks/tasks/networks.yml
|
||
| auth: "{{ os_networks_auth }}" | ||
| region_name: "{{ os_networks_region | default(omit) }}" | ||
| cacert: "{{ os_networks_cacert | default(omit) }}" | ||
| cloud: "{{ os_networks_cloud | default(omit) }}" | ||
| interface: "{{ os_networks_interface | default(omit, true) }}" | ||
| name: "{{ item.name }}" | ||
| local_as: "{{ item.local_as }}" | ||
| ip_version: "{{ item.ip_version | default(omit) }}" | ||
| advertise_floating_ip_host_routes: "{{ item.advertise_floating_ip_host_routes | default(omit) }}" | ||
| advertise_tenant_networks: "{{ item.advertise_tenant_networks | default(omit) }}" | ||
| state: "{{ item.state | default(omit) }}" | ||
| with_items: "{{ os_networks_bgp_speakers }}" | ||
| when: os_networks_bgp_speakers | default([]) | length > 0 | ||
|
|
||
| - name: Ensure BGP Peers are created | ||
| openstack.cloud.bgp_peer: | ||
| auth_type: "{{ os_networks_auth_type }}" | ||
| auth: "{{ os_networks_auth }}" | ||
| region_name: "{{ os_networks_region | default(omit) }}" | ||
| cacert: "{{ os_networks_cacert | default(omit) }}" | ||
| cloud: "{{ os_networks_cloud | default(omit) }}" | ||
| interface: "{{ os_networks_interface | default(omit, true) }}" | ||
| name: "{{ item.name }}" | ||
| remote_as: "{{ item.remote_as }}" | ||
| peer_ip: "{{ item.peer_ip }}" | ||
| peer_auth_type: "{{ item.peer_auth_type | default(omit)}}" | ||
| password: "{{ item.password | default(omit) }}" | ||
| state: "{{ item.state | default(omit) }}" | ||
| with_items: "{{ os_networks_bgp_peers }}" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to the BGP speakers task, this task will fail if with_items: "{{ os_networks_bgp_peers }}"
when: os_networks_bgp_peers | default([]) | length > 0 |
||
| when: os_networks_bgp_peers | default([]) | length > 0 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This task will fail if the
os_networks_bgp_speakersvariable is not defined. To make the role more robust, you should add awhencondition to only run this task if the list is defined and not empty. I'd also recommend addingos_networks_bgp_speakers: []todefaults/main.yml.