diff --git a/geant/gap_ansible/playbooks/base_config_checks.yaml b/geant/gap_ansible/playbooks/base_config_checks.yaml index a00837e86c2705a0b139a1957197f1b904d8af21..8ee3838b790298a0dacb5c2f77165795388bbb9b 100644 --- a/geant/gap_ansible/playbooks/base_config_checks.yaml +++ b/geant/gap_ansible/playbooks/base_config_checks.yaml @@ -2,7 +2,5 @@ hosts: all connection: netconf gather_facts: false - # remote_user: "{{ gap_ansible_user }}" - remote_user: geant-ne-na-lab roles: - ../roles/base_config_checks diff --git a/geant/gap_ansible/playbooks/check_ibgp.yaml b/geant/gap_ansible/playbooks/check_ibgp.yaml index 53b384096c74f1cb97e0fb9cee9577e29d963507..9f85b5e9f33c7a7713aa3d7e3f2e4d675d8a2dbd 100644 --- a/geant/gap_ansible/playbooks/check_ibgp.yaml +++ b/geant/gap_ansible/playbooks/check_ibgp.yaml @@ -1,7 +1,5 @@ - name: Check iBGP status on P hosts: all - # remote_user: "{{ gap_ansible_user }}" - remote_user: geant-ne-na-lab gather_facts: false roles: - Juniper.junos diff --git a/geant/gap_ansible/playbooks/iptrunks_checks.yaml b/geant/gap_ansible/playbooks/iptrunks_checks.yaml index bc134eb7b5fc45aa2f2e6e5d8b7e9deb41682a37..b171eec5914583422ddbd7fdf22767ec07069e27 100644 --- a/geant/gap_ansible/playbooks/iptrunks_checks.yaml +++ b/geant/gap_ansible/playbooks/iptrunks_checks.yaml @@ -1,7 +1,5 @@ - name: Manage iptrunks checks playbook hosts: all - # remote_user: "{{ gap_ansible_user }}" - # remote_user: geant-ne-na-lab gather_facts: false roles: - Juniper.junos diff --git a/geant/gap_ansible/playbooks/iptrunks_migration.yaml b/geant/gap_ansible/playbooks/iptrunks_migration.yaml index e6b61639f9f27d1e1156f059e2480b622f1270f8..6943bd7baa114493c008788d58eef7a61be55d8d 100644 --- a/geant/gap_ansible/playbooks/iptrunks_migration.yaml +++ b/geant/gap_ansible/playbooks/iptrunks_migration.yaml @@ -1,7 +1,5 @@ - name: Manage iptrunks migration hosts: all - # remote_user: "{{ gap_ansible_user }}" - remote_user: geant-ne-na-lab gather_facts: false roles: - Juniper.junos diff --git a/geant/gap_ansible/playbooks/update_ibgp_mesh.yaml b/geant/gap_ansible/playbooks/update_ibgp_mesh.yaml index 73599f7a91a4eb0439f407cfce86c69d5fbc65a4..947dcc2780667cbce2a3f2db7621c4886e8662b5 100644 --- a/geant/gap_ansible/playbooks/update_ibgp_mesh.yaml +++ b/geant/gap_ansible/playbooks/update_ibgp_mesh.yaml @@ -1,7 +1,5 @@ - name: Manage iBGP mesh hosts: all - # remote_user: "{{ gap_ansible_user }}" - remote_user: geant-ne-na-lab gather_facts: false roles: - Juniper.junos diff --git a/geant/gap_ansible/roles/base_config/tasks/deploy_base_config.yaml b/geant/gap_ansible/roles/base_config/tasks/deploy_base_config.yaml index 8594962c92698eba606f95e2ef63d6ad24fad758..37c1991597b336a5d75e692d229e6ccb656d8bae 100644 --- a/geant/gap_ansible/roles/base_config/tasks/deploy_base_config.yaml +++ b/geant/gap_ansible/roles/base_config/tasks/deploy_base_config.yaml @@ -17,20 +17,12 @@ src: "/var/tmp/ansible_run_{{ opid }}/{{ mytemplates.template_name }}.conf" src_format: text comment: "{{ commit_comment }}" - register: response + diff: true when: > verb == "deploy" and ( dry_run | ansible.builtin.bool ) is false and 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] ansible.netcommon.netconf_config: # geant.gap_ansible.nokia_netconf_config: diff --git a/geant/gap_ansible/roles/base_config_checks/tasks/base_config_checks_juniper.yaml b/geant/gap_ansible/roles/base_config_checks/tasks/base_config_checks_juniper.yaml index 8ae1ef1d37a7d0d08965b9a037f1466e8417ea97..4f741af0d20517c352af0bf823adba403897a6ec 100644 --- a/geant/gap_ansible/roles/base_config_checks/tasks/base_config_checks_juniper.yaml +++ b/geant/gap_ansible/roles/base_config_checks/tasks/base_config_checks_juniper.yaml @@ -1,5 +1,5 @@ - name: Base config Juniper checks - juniernetworks.junos.junos_command: + junipernetworks.junos.junos_command: commands: - show version - show system alarms diff --git a/geant/gap_ansible/roles/ibgp_update/tasks/deploy.yaml b/geant/gap_ansible/roles/ibgp_update/tasks/deploy.yaml index 75f71908eb7acc408622401a439ceef15b07faaf..71e989590667d4fccc97a689962c6c3e271e096e 100644 --- a/geant/gap_ansible/roles/ibgp_update/tasks/deploy.yaml +++ b/geant/gap_ansible/roles/ibgp_update/tasks/deploy.yaml @@ -16,7 +16,7 @@ src: "/var/tmp/ansible_run_{{ opid }}/{{ verb }}.conf" src_format: set comment: "{{ commit_comment }}" - # diff: true + diff: true when: > ( dry_run | ansible.builtin.bool ) is false and vendor == "juniper" @@ -51,7 +51,7 @@ content: "{{ lookup('ansible.builtin.template', '{{ vendor }}/{{ verb }}.j2') }}" commit: true # commit_comment: "Base-config provisioned using GSO." - # diff: true + diff: true check_mode: false when: > ( dry_run | ansible.builtin.bool ) is false and diff --git a/geant/gap_ansible/roles/iptrunk/tasks/deploy_object.yaml b/geant/gap_ansible/roles/iptrunk/tasks/deploy_object.yaml index cfa6c675faf81fdcf957f14cfe9ffe882325f8a7..56de21a786f55e77da93d9e0901e8e7dc1c0e155 100644 --- a/geant/gap_ansible/roles/iptrunk/tasks/deploy_object.yaml +++ b/geant/gap_ansible/roles/iptrunk/tasks/deploy_object.yaml @@ -17,6 +17,7 @@ src: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf" src_format: text comment: "{{ commit_comment }}" + diff: true when: > verb == "deploy" and local_side.iptrunk_side_node.vendor == "juniper" and @@ -49,7 +50,7 @@ default_operation: merge content: "{{ lookup('ansible.builtin.template', '{{ local_side.iptrunk_side_node.vendor }}/{{ config_object }}.j2') }}" commit: true - # diff: true + diff: true check_mode: false when: > verb == "deploy" and diff --git a/geant/gap_ansible/roles/iptrunk/tasks/modify_trunk.yaml b/geant/gap_ansible/roles/iptrunk/tasks/modify_trunk.yaml index 584e8ca9656dbb58628f87f0b9d227d568dd2a42..f99b0df4f0adccded7e53d3db70af9536f23d880 100644 --- a/geant/gap_ansible/roles/iptrunk/tasks/modify_trunk.yaml +++ b/geant/gap_ansible/roles/iptrunk/tasks/modify_trunk.yaml @@ -24,4 +24,5 @@ src: "/var/tmp/ansible_run_{{ opid }}/isis_interface.conf" src_format: text comment: "{{ commit_comment }}" + diff: true when: verb == "modify" and not (dry_run | ansible.builtin.bool) and (modify_metric | ansible.builtin.bool) diff --git a/geant/gap_ansible/roles/iptrunk_migration/tasks/main.yml b/geant/gap_ansible/roles/iptrunk_migration/tasks/main.yml index 67c71a7c5c477d2b82b512e8a3855e750f8de9dc..9474d27a6c5024cbd1a740214478f5911dd07577 100644 --- a/geant/gap_ansible/roles/iptrunk_migration/tasks/main.yml +++ b/geant/gap_ansible/roles/iptrunk_migration/tasks/main.yml @@ -45,10 +45,16 @@ ansible.builtin.set_fact: ansible_host: "{{ new_node.router.router_site.site_ts_address }}" 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_network_os: "{{ netconf_access[new_node.router.vendor].ansible_network_os }}" when: - verb == "deploy" and ( new_node.router.router_access_via_ts | ansible.builtin.bool ) is true + verb == "deploy" - name: Print the ID ansible.builtin.debug: