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

rename attribute router_vendor in vendor

parent e5e05aa8
No related branches found
No related tags found
1 merge request!65rename attribute router_vendor in vendor
Pipeline #85238 passed
......@@ -14,7 +14,7 @@
- name: Print the template in "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf"
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"
lstrip_blocks: true
trim_blocks: true
......
......@@ -10,7 +10,7 @@
register: response
when: >
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
- name: Show DRY diff of "{{ config_object }}"
......@@ -19,7 +19,7 @@
when: >
verb == "deploy"
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]
juniper_junos_config:
......@@ -32,7 +32,7 @@
register: response
when: >
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)
- name: Show real diff of "{{ config_object }}"
......@@ -40,31 +40,31 @@
msg: "{{ response }}"
when: >
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)
- name: Deploy "{{ config_object }}" on "{{ inventory_hostname }}" [CHECK ONLY][NOKIA]
ansible.netcommon.netconf_config:
format: xml
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
diff: true
check_mode: true
when: >
verb == "deploy" 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]
ansible.netcommon.netconf_config:
format: xml
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
diff: true
check_mode: false
when: >
verb == "deploy" 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 @@
- name: Load netconf connection config
ansible.builtin.set_fact:
ansible_connection: "{{ netconf_access[local_side.iptrunk_side_node.router_vendor].ansible_connection }}"
ansible_network_os: "{{ netconf_access[local_side.iptrunk_side_node.router_vendor].ansible_network_os }}"
ansible_connection: "{{ netconf_access[local_side.iptrunk_side_node.vendor].ansible_connection }}"
ansible_network_os: "{{ netconf_access[local_side.iptrunk_side_node.vendor].ansible_network_os }}"
- name: Load remote info
ansible.builtin.set_fact:
......
......@@ -11,7 +11,7 @@
when:
verb == "terminate" 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 }}"
ansible.builtin.debug:
......@@ -19,7 +19,7 @@
when:
verb == "terminate" 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]
juniper_junos_config:
......@@ -33,7 +33,7 @@
when:
verb == "terminate" 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 }}"
ansible.builtin.debug:
......@@ -41,30 +41,30 @@
when:
verb == "terminate" 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]
ansible.netcommon.netconf_config:
format: xml
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
diff: true
check_mode: true
when: >
verb == "terminate" 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]
ansible.netcommon.netconf_config:
format: xml
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
diff: true
check_mode: false
when: >
verb == "terminate" 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