Skip to content
Snippets Groups Projects
Commit 9a6dd753 authored by Simone Spinelli's avatar Simone Spinelli
Browse files

Merge branch 'fix_router_vendor' into 'develop'

rename attribute router_vendor in vendor

See merge request !65
parents e5e05aa8 59243a9a
No related branches found
No related tags found
1 merge request!65rename attribute router_vendor in vendor
Pipeline #85239 passed
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
- name: Print the template in "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf" - name: Print the template in "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf"
ansible.builtin.template: ansible.builtin.template:
src: "{{ local_side.iptrunk_side_node.router_vendor }}/{{ config_object }}.j2" src: "{{ local_side.iptrunk_side_node.vendor }}/{{ config_object }}.j2"
dest: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf" dest: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf"
lstrip_blocks: true lstrip_blocks: true
trim_blocks: true trim_blocks: true
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
register: response register: response
when: > when: >
verb == "deploy" and verb == "deploy" and
local_side.iptrunk_side_node.router_vendor == "juniper" and local_side.iptrunk_side_node.vendor == "juniper" and
dry_run | ansible.builtin.bool dry_run | ansible.builtin.bool
- name: Show DRY diff of "{{ config_object }}" - name: Show DRY diff of "{{ config_object }}"
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
when: > when: >
verb == "deploy" verb == "deploy"
and dry_run | ansible.builtin.bool and and dry_run | ansible.builtin.bool and
local_side.iptrunk_side_node.router_vendor == "juniper" local_side.iptrunk_side_node.vendor == "juniper"
- name: Deploy "{{ config_object }}" on "{{ inventory_hostname }}" [AND COMMIT][JUNIPER] - name: Deploy "{{ config_object }}" on "{{ inventory_hostname }}" [AND COMMIT][JUNIPER]
juniper_junos_config: juniper_junos_config:
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
register: response register: response
when: > when: >
verb == "deploy" and verb == "deploy" and
local_side.iptrunk_side_node.router_vendor == "juniper" and local_side.iptrunk_side_node.vendor == "juniper" and
not (dry_run | ansible.builtin.bool) not (dry_run | ansible.builtin.bool)
- name: Show real diff of "{{ config_object }}" - name: Show real diff of "{{ config_object }}"
...@@ -40,31 +40,31 @@ ...@@ -40,31 +40,31 @@
msg: "{{ response }}" msg: "{{ response }}"
when: > when: >
verb == "deploy" and verb == "deploy" and
local_side.iptrunk_side_node.router_vendor == "juniper" and local_side.iptrunk_side_node.vendor == "juniper" and
not (dry_run | ansible.builtin.bool) not (dry_run | ansible.builtin.bool)
- name: Deploy "{{ config_object }}" on "{{ inventory_hostname }}" [CHECK ONLY][NOKIA] - name: Deploy "{{ config_object }}" on "{{ inventory_hostname }}" [CHECK ONLY][NOKIA]
ansible.netcommon.netconf_config: ansible.netcommon.netconf_config:
format: xml format: xml
default_operation: merge default_operation: merge
content: "{{ lookup('ansible.builtin.template', '{{ local_side.iptrunk_side_node.router_vendor }}/{{ config_object }}.j2') }}" content: "{{ lookup('ansible.builtin.template', '{{ local_side.iptrunk_side_node.vendor }}/{{ config_object }}.j2') }}"
commit: true commit: true
diff: true diff: true
check_mode: true check_mode: true
when: > when: >
verb == "deploy" and verb == "deploy" and
( dry_run | ansible.builtin.bool ) is true and ( dry_run | ansible.builtin.bool ) is true and
local_side.iptrunk_side_node.router_vendor == "nokia" local_side.iptrunk_side_node.vendor == "nokia"
- name: Deploy base_config on "{{ inventory_hostname }}" [AND COMMIT][NOKIA] - name: Deploy base_config on "{{ inventory_hostname }}" [AND COMMIT][NOKIA]
ansible.netcommon.netconf_config: ansible.netcommon.netconf_config:
format: xml format: xml
default_operation: merge default_operation: merge
content: "{{ lookup('ansible.builtin.template', '{{ local_side.iptrunk_side_node.router_vendor }}/{{ config_object }}.j2') }}" content: "{{ lookup('ansible.builtin.template', '{{ local_side.iptrunk_side_node.vendor }}/{{ config_object }}.j2') }}"
commit: true commit: true
diff: true diff: true
check_mode: false check_mode: false
when: > when: >
verb == "deploy" and verb == "deploy" and
( dry_run | ansible.builtin.bool ) is false and ( dry_run | ansible.builtin.bool ) is false and
local_side.iptrunk_side_node.router_vendor == "nokia" local_side.iptrunk_side_node.vendor == "nokia"
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
- name: Load netconf connection config - name: Load netconf connection config
ansible.builtin.set_fact: ansible.builtin.set_fact:
ansible_connection: "{{ netconf_access[local_side.iptrunk_side_node.router_vendor].ansible_connection }}" ansible_connection: "{{ netconf_access[local_side.iptrunk_side_node.vendor].ansible_connection }}"
ansible_network_os: "{{ netconf_access[local_side.iptrunk_side_node.router_vendor].ansible_network_os }}" ansible_network_os: "{{ netconf_access[local_side.iptrunk_side_node.vendor].ansible_network_os }}"
- name: Load remote info - name: Load remote info
ansible.builtin.set_fact: ansible.builtin.set_fact:
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
when: when:
verb == "terminate" and verb == "terminate" and
dry_run | ansible.builtin.bool and dry_run | ansible.builtin.bool and
local_side.iptrunk_side_node.router_vendor == "juniper" local_side.iptrunk_side_node.vendor == "juniper"
- name: Show DRY diff of "{{ config_object }}" - name: Show DRY diff of "{{ config_object }}"
ansible.builtin.debug: ansible.builtin.debug:
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
when: when:
verb == "terminate" and verb == "terminate" and
dry_run | ansible.builtin.bool and dry_run | ansible.builtin.bool and
local_side.iptrunk_side_node.router_vendor == "juniper" local_side.iptrunk_side_node.vendor == "juniper"
- name: Remove "{{ config_object }}" [FOR REAL] - name: Remove "{{ config_object }}" [FOR REAL]
juniper_junos_config: juniper_junos_config:
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
when: when:
verb == "terminate" and verb == "terminate" and
not (dry_run | ansible.builtin.bool) and not (dry_run | ansible.builtin.bool) and
local_side.iptrunk_side_node.router_vendor == "juniper" local_side.iptrunk_side_node.vendor == "juniper"
- name: Show real diff of "{{ config_object }}" - name: Show real diff of "{{ config_object }}"
ansible.builtin.debug: ansible.builtin.debug:
...@@ -41,30 +41,30 @@ ...@@ -41,30 +41,30 @@
when: when:
verb == "terminate" and verb == "terminate" and
dry_run | ansible.builtin.bool and dry_run | ansible.builtin.bool and
local_side.iptrunk_side_node.router_vendor == "juniper" local_side.iptrunk_side_node.vendor == "juniper"
- name: Remove "{{ config_object }}" on "{{ inventory_hostname }}" [CHECK ONLY][NOKIA] - name: Remove "{{ config_object }}" on "{{ inventory_hostname }}" [CHECK ONLY][NOKIA]
ansible.netcommon.netconf_config: ansible.netcommon.netconf_config:
format: xml format: xml
default_operation: merge default_operation: merge
content: "{{ lookup('ansible.builtin.template', '{{ local_side.iptrunk_side_node.router_vendor }}/{{ config_object }}.j2') }}" content: "{{ lookup('ansible.builtin.template', '{{ local_side.iptrunk_side_node.vendor }}/{{ config_object }}.j2') }}"
commit: true commit: true
diff: true diff: true
check_mode: true check_mode: true
when: > when: >
verb == "terminate" and verb == "terminate" and
( dry_run | ansible.builtin.bool ) and ( dry_run | ansible.builtin.bool ) and
local_side.iptrunk_side_node.router_vendor == "nokia" local_side.iptrunk_side_node.vendor == "nokia"
- name: Remove base_config on "{{ inventory_hostname }}" [AND COMMIT][NOKIA] - name: Remove base_config on "{{ inventory_hostname }}" [AND COMMIT][NOKIA]
ansible.netcommon.netconf_config: ansible.netcommon.netconf_config:
format: xml format: xml
default_operation: merge default_operation: merge
content: "{{ lookup('ansible.builtin.template', '{{ local_side.iptrunk_side_node.router_vendor }}/{{ config_object }}.j2') }}" content: "{{ lookup('ansible.builtin.template', '{{ local_side.iptrunk_side_node.vendor }}/{{ config_object }}.j2') }}"
commit: true commit: true
diff: true diff: true
check_mode: false check_mode: false
when: > when: >
verb == "terminate" and verb == "terminate" and
not ( dry_run | ansible.builtin.bool ) and not ( dry_run | ansible.builtin.bool ) and
local_side.iptrunk_side_node.router_vendor == "nokia" local_side.iptrunk_side_node.vendor == "nokia"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment