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 9c25cf27c9410ca93bd92cb3c74f8bb56d70619e..1a0b6dc068ee90183c6627546fe2d188395cd50e 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 @@ -5,11 +5,17 @@ src_format: text check_commit: true diff: true + register: output when: > verb == "deploy" and ( dry_run | ansible.builtin.bool ) is true and wfo_router.router.vendor == "juniper" +- name: Fail if there is any diff + ansible.builtin.fail: + msg: There are diffs!!!! + when: output.diff != "" and is_verification_workfloy == true + - name: Deploy base_config on "{{ inventory_hostname }}" [AND COMMIT][Juniper] junipernetworks.junos.junos_config: @@ -32,12 +38,19 @@ commit: true validate: true diff: true + register: output check_mode: true when: > verb == "deploy" and ( dry_run | ansible.builtin.bool ) is true and wfo_router.router.vendor == "nokia" +- name: Fail if there is any diff + ansible.builtin.fail: + msg: There are diffs!!!! + when: output.diff != "" and is_verification_workfloy == true + + - name: Validation succeeded ansible.builtin.debug: msg: "Base config has been validated against the router and no syntax errors were found"