Skip to content
Snippets Groups Projects
Commit 3f725604 authored by Aleksandr Kurbatov's avatar Aleksandr Kurbatov
Browse files

changes to `ibgp_update` role

2 major types of modifications:
- target is a generated list of routers -> modify_router_list
- target is subscription -> modify_subscription_router

Depending on the inventory passed, the `vendor` var is accessed
differently, hence the need to distinguish (based on the `verb`).
parent 6b7f148f
No related branches found
No related tags found
1 merge request!162promote-p-to-pe role
Pipeline #88656 passed
...@@ -35,20 +35,17 @@ ...@@ -35,20 +35,17 @@
ansible.builtin.debug: ansible.builtin.debug:
msg: "{{ opid }}" msg: "{{ opid }}"
- name: Include PE mesh modification tasks - name: Include list of routers modification tasks
ansible.builtin.include_tasks: modify_pe_mesh.yaml ansible.builtin.include_tasks: modify_router_list.yaml
when: > when: >
verb in [ "add_p_to_pe", "add_pe_to_pe_mesh", "remove_pe_from_pe", "remove_p_from_pe" ] verb in [ "add_p_to_pe", "add_pe_to_pe_mesh", "add_pe_to_all_p",
"remove_p_from_pe", "remove_pe_from_pe" ]
- name: Include PE into P tasks if selected - name: Include single router modification tasks
ansible.builtin.include_tasks: add_pe_to_p.yaml ansible.builtin.include_tasks: modify_subscription_router.yaml
when: > when: >
verb in [ "add_pe_to_p", "verify_p_ibgp", "add_pe_mesh_to_pe" ] verb in [ "add_pe_to_p", "verify_p_ibgp", "add_pe_mesh_to_pe",
"add_all_p_to_pe", "remove_pe_from_p" ]
- name: Include PE removal from P tasks if selected
ansible.builtin.include_tasks: remove_pe_from_p.yaml
when: >
verb in [ "remove_pe_from_p" ]
- name: Check status of iBGP on Nokia router - name: Check status of iBGP on Nokia router
ansible.builtin.include_tasks: check_nokia_ibgp.yaml ansible.builtin.include_tasks: check_nokia_ibgp.yaml
......
# PE to P tasks:
# This is th case of decomm of a PE router <- remove it from all Ps.
# P routers will always be NOKIA
# FIX: Load ansible_network_os via group_vars
#
- name: Set variable to connect to nokia
ansible.legacy.set_fact:
ansible_network_os: geant.gap_ansible.sros
ansible_connection: netconf
# - name: Set ansible_host to terminal server when router is offline
# ansible.legacy.set_fact:
# ansible_host: "{{ subscription.router.router_site.site_ts_address }}"
# ansible_port: "{{ subscription.router.router_ts_port }}"
# when: ( subscription.router.router_access_via_ts | ansible.builtin.bool ) is true
- name: Set vendor var for "remove_pe_from_p" case
ansible.builtin.set_fact:
vendor: "nokia"
- name: Include compile tasks
ansible.builtin.include_tasks: compile.yaml
- name: Include deploy tasks
ansible.builtin.include_tasks: deploy.yaml
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment