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 8594621f6b519bf8fd5f5084da60ee9f28b11b82..8594962c92698eba606f95e2ef63d6ad24fad758 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
@@ -1,31 +1,21 @@
- name: Deploy base_config on "{{ inventory_hostname }}" [CHECK ONLY][Juniper]
- juniper_junos_config:
- load: 'replace'
+ junipernetworks.junos.junos_config:
+ update: 'replace'
src: "/var/tmp/ansible_run_{{ opid }}/{{ mytemplates.template_name }}.conf"
- format: text
- config_mode: "private"
- check: true
- commit: false
- register: response
+ src_format: text
+ check_commit: true
+ diff: true
when: >
verb == "deploy" and
( dry_run | ansible.builtin.bool ) is true and
wfo_router.router.vendor == "juniper"
-- name: Show diff for dry run
- ansible.builtin.debug:
- msg: "{{ response }}"
- when: >
- verb == "deploy" and
- ( dry_run | ansible.builtin.bool ) is true and
- wfo_router.router.vendor == "juniper"
- name: Deploy base_config on "{{ inventory_hostname }}" [AND COMMIT][Juniper]
- juniper_junos_config:
- load: 'replace'
+ junipernetworks.junos.junos_config:
+ update: 'replace'
src: "/var/tmp/ansible_run_{{ opid }}/{{ mytemplates.template_name }}.conf"
- format: text
- config_mode: "private"
+ src_format: text
comment: "{{ commit_comment }}"
register: response
when: >
@@ -33,13 +23,13 @@
( 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: 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:
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
new file mode 100644
index 0000000000000000000000000000000000000000..8ae1ef1d37a7d0d08965b9a037f1466e8417ea97
--- /dev/null
+++ b/geant/gap_ansible/roles/base_config_checks/tasks/base_config_checks_juniper.yaml
@@ -0,0 +1,5 @@
+- name: Base config Juniper checks
+ juniernetworks.junos.junos_command:
+ commands:
+ - show version
+ - show system alarms
diff --git a/geant/gap_ansible/roles/base_config_checks/tasks/main.yml b/geant/gap_ansible/roles/base_config_checks/tasks/main.yml
index adf864bed20af1400c8edc21db3c97f18981eb87..2dc23352e83653503b981d5c5f4dc4348249c124 100644
--- a/geant/gap_ansible/roles/base_config_checks/tasks/main.yml
+++ b/geant/gap_ansible/roles/base_config_checks/tasks/main.yml
@@ -20,6 +20,14 @@
when:
wfo_router.router.vendor == "juniper"
-- name: Execute post-check command
+- name: Execute post-check command [NOKIA]
+ when:
+ wfo_router.router.vendor == "nokia"
ansible.builtin.include_tasks: base_config_single_command.yaml
with_items: "{{ commands }}"
+
+- name: Execute post-check command [JUNIPER]
+ when:
+ wfo_router.router.vendor == "juniper"
+ ansible.builtin.include_tasks: base_config_checks_juniper.yaml
+ # with_items: "{{ commands }}"