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

Merge branch 'cleanup' into 'develop'

Cleanup

See merge request !116
parents c116d8db 70eb75ec
No related branches found
No related tags found
1 merge request!116Cleanup
Pipeline #85884 passed
Showing
with 14 additions and 24 deletions
...@@ -2,7 +2,5 @@ ...@@ -2,7 +2,5 @@
hosts: all hosts: all
connection: netconf connection: netconf
gather_facts: false gather_facts: false
# remote_user: "{{ gap_ansible_user }}"
remote_user: geant-ne-na-lab
roles: roles:
- ../roles/base_config_checks - ../roles/base_config_checks
- name: Check iBGP status on P - name: Check iBGP status on P
hosts: all hosts: all
# remote_user: "{{ gap_ansible_user }}"
remote_user: geant-ne-na-lab
gather_facts: false gather_facts: false
roles: roles:
- Juniper.junos - Juniper.junos
......
- name: Manage iptrunks checks playbook - name: Manage iptrunks checks playbook
hosts: all hosts: all
# remote_user: "{{ gap_ansible_user }}"
# remote_user: geant-ne-na-lab
gather_facts: false gather_facts: false
roles: roles:
- Juniper.junos - Juniper.junos
......
- name: Manage iptrunks migration - name: Manage iptrunks migration
hosts: all hosts: all
# remote_user: "{{ gap_ansible_user }}"
remote_user: geant-ne-na-lab
gather_facts: false gather_facts: false
roles: roles:
- Juniper.junos - Juniper.junos
......
- name: Manage iBGP mesh - name: Manage iBGP mesh
hosts: all hosts: all
# remote_user: "{{ gap_ansible_user }}"
remote_user: geant-ne-na-lab
gather_facts: false gather_facts: false
roles: roles:
- Juniper.junos - Juniper.junos
......
...@@ -17,20 +17,12 @@ ...@@ -17,20 +17,12 @@
src: "/var/tmp/ansible_run_{{ opid }}/{{ mytemplates.template_name }}.conf" src: "/var/tmp/ansible_run_{{ opid }}/{{ mytemplates.template_name }}.conf"
src_format: text src_format: text
comment: "{{ commit_comment }}" comment: "{{ commit_comment }}"
register: response diff: true
when: > when: >
verb == "deploy" and verb == "deploy" and
( dry_run | ansible.builtin.bool ) is false and ( dry_run | ansible.builtin.bool ) is false and
wfo_router.router.vendor == "juniper" wfo_router.router.vendor == "juniper"
# - name: Show diff
# ansible.builtin.debug:
# msg: "{{ response }}"
# when: >
# verb == "deploy" and
# ( dry_run | ansible.builtin.bool ) is false and
# wfo_router.router.vendor == "juniper"
- name: Deploy base_config on "{{ inventory_hostname }}" [CHECK ONLY][NOKIA] - name: Deploy base_config on "{{ inventory_hostname }}" [CHECK ONLY][NOKIA]
ansible.netcommon.netconf_config: ansible.netcommon.netconf_config:
# geant.gap_ansible.nokia_netconf_config: # geant.gap_ansible.nokia_netconf_config:
......
- name: Base config Juniper checks - name: Base config Juniper checks
juniernetworks.junos.junos_command: junipernetworks.junos.junos_command:
commands: commands:
- show version - show version
- show system alarms - show system alarms
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
src: "/var/tmp/ansible_run_{{ opid }}/{{ verb }}.conf" src: "/var/tmp/ansible_run_{{ opid }}/{{ verb }}.conf"
src_format: set src_format: set
comment: "{{ commit_comment }}" comment: "{{ commit_comment }}"
# diff: true diff: true
when: > when: >
( dry_run | ansible.builtin.bool ) is false and ( dry_run | ansible.builtin.bool ) is false and
vendor == "juniper" vendor == "juniper"
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
content: "{{ lookup('ansible.builtin.template', '{{ vendor }}/{{ verb }}.j2') }}" content: "{{ lookup('ansible.builtin.template', '{{ vendor }}/{{ verb }}.j2') }}"
commit: true commit: true
# commit_comment: "Base-config provisioned using GSO." # commit_comment: "Base-config provisioned using GSO."
# diff: true diff: true
check_mode: false check_mode: false
when: > when: >
( dry_run | ansible.builtin.bool ) is false and ( dry_run | ansible.builtin.bool ) is false and
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
src: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf" src: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf"
src_format: text src_format: text
comment: "{{ commit_comment }}" comment: "{{ commit_comment }}"
diff: true
when: > when: >
verb == "deploy" and verb == "deploy" and
local_side.iptrunk_side_node.vendor == "juniper" and local_side.iptrunk_side_node.vendor == "juniper" and
...@@ -49,7 +50,7 @@ ...@@ -49,7 +50,7 @@
default_operation: merge default_operation: merge
content: "{{ lookup('ansible.builtin.template', '{{ local_side.iptrunk_side_node.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
......
...@@ -24,4 +24,5 @@ ...@@ -24,4 +24,5 @@
src: "/var/tmp/ansible_run_{{ opid }}/isis_interface.conf" src: "/var/tmp/ansible_run_{{ opid }}/isis_interface.conf"
src_format: text src_format: text
comment: "{{ commit_comment }}" comment: "{{ commit_comment }}"
diff: true
when: verb == "modify" and not (dry_run | ansible.builtin.bool) and (modify_metric | ansible.builtin.bool) when: verb == "modify" and not (dry_run | ansible.builtin.bool) and (modify_metric | ansible.builtin.bool)
...@@ -45,10 +45,16 @@ ...@@ -45,10 +45,16 @@
ansible.builtin.set_fact: ansible.builtin.set_fact:
ansible_host: "{{ new_node.router.router_site.site_ts_address }}" ansible_host: "{{ new_node.router.router_site.site_ts_address }}"
ansible_port: "{{ new_node.router.router_ts_port }}" ansible_port: "{{ new_node.router.router_ts_port }}"
when:
verb == "deploy" and ( new_node.router.router_access_via_ts | ansible.builtin.bool ) is true
# TODO: set ansible_connection / ansible_network_os when not TS
- name: Set connection and host OS
ansible.builtin.set_fact:
ansible_connection: "{{ netconf_access[new_node.router.vendor].ansible_connection }}" ansible_connection: "{{ netconf_access[new_node.router.vendor].ansible_connection }}"
ansible_network_os: "{{ netconf_access[new_node.router.vendor].ansible_network_os }}" ansible_network_os: "{{ netconf_access[new_node.router.vendor].ansible_network_os }}"
when: when:
verb == "deploy" and ( new_node.router.router_access_via_ts | ansible.builtin.bool ) is true verb == "deploy"
- name: Print the ID - name: Print the ID
ansible.builtin.debug: ansible.builtin.debug:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment