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

`ansible_connection` in ibgp_update

parent 1bdcd035
Branches
Tags
1 merge request!189Fix/ansible connection private config
- name: Set variable to connect to nokia - name: Set variable to connect to nokia
ansible.legacy.set_fact: ansible.legacy.set_fact:
ansible_network_os: nokia.sros.md ansible_connection: "{{ netconf_access[wfo_router.router.vendor].ansible_connection }}"
ansible_connection: netconf ansible_network_os: "{{ netconf_access[wfo_router.router.vendor].ansible_network_os }}"
- name: Check BGP status - name: Check BGP status
block: block:
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
- name: Set back ansible_host to target terminal server - name: Set back ansible_host to target terminal server
ansible.builtin.set_fact: ansible.builtin.set_fact:
ansible_host: "{{ wfo_router.router.router_site.site_ts_address }}" ansible_host: "{{ wfo_router.router.router_site.site_ts_address }}"
ansible_connection: netconf ansible_connection: "{{ netconf_access[wfo_router.router.vendor].ansible_connection }}"
when: when:
wfo_router.router.router_access_via_ts is defined and wfo_router.router.router_access_via_ts is defined and
( wfo_router.router.router_access_via_ts | ansible.builtin.bool ) is true ( wfo_router.router.router_access_via_ts | ansible.builtin.bool ) is true
......
...@@ -3,18 +3,9 @@ ...@@ -3,18 +3,9 @@
# PEs can be either Juniper or Nokia # PEs can be either Juniper or Nokia
- name: Adjust network connection according to the vendor - name: Adjust network connection according to the vendor
block: ansible.builtin.set_fact:
- name: Set variable to connect to nokia ansible_connection: "{{ netconf_access[wfo_router.router.vendor].ansible_connection }}"
ansible.legacy.set_fact: ansible_network_os: "{{ netconf_access[wfo_router.router.vendor].ansible_network_os }}"
ansible_network_os: geant.gap_ansible.sros
ansible_connection: netconf
when: vendor == "nokia"
- name: Set variables for connecting to Junos
ansible.legacy.set_fact:
ansible_network_os: junos
ansible_connection: netconf
when: vendor == "juniper"
- name: Include compile tasks - name: Include compile tasks
ansible.builtin.include_tasks: compile.yaml ansible.builtin.include_tasks: compile.yaml
......
...@@ -2,12 +2,11 @@ ...@@ -2,12 +2,11 @@
# We need to add all the existing PE the new P # We need to add all the existing PE the new P
# P routers will always be NOKIA # P routers will always be NOKIA
# In this case you have wfo_router as external variable # In this case you have wfo_router as external variable
# FIX: Load ansible_network_os via group_vars
# #
- name: Set variable to connect to nokia - name: Set variable to connect to nokia
ansible.builtin.set_fact: ansible.builtin.set_fact:
ansible_network_os: geant.gap_ansible.sros ansible_connection: "{{ netconf_access[subscription.router.vendor].ansible_connection }}"
ansible_connection: netconf ansible_network_os: "{{ netconf_access[subscription.router.vendor].ansible_network_os }}"
- name: Set ansible_host to terminal server when router is offline - name: Set ansible_host to terminal server when router is offline
ansible.builtin.set_fact: ansible.builtin.set_fact:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment