diff --git a/roles/bgp_checks/tasks/check.yaml b/roles/bgp_checks/tasks/check.yaml index 56664371ab2a90469c6d126edef41bedc5df0531..2a59174842ecdf58da6272a94924ae9616af8078 100644 --- a/roles/bgp_checks/tasks/check.yaml +++ b/roles/bgp_checks/tasks/check.yaml @@ -66,9 +66,10 @@ - name: Compare the number of advertised routes ansible.builtin.assert: that: - - "((pre_check.{{ check_id }}.bgp_adv_routes - post_check.{{ check_id }}.bgp_adv_routes) / pre_check.{{ check_id }}.bgp_adv_routes) * 100 | abs <= 5" + - "((pre_check.{{ check_id }}.bgp_adv_routes - post_check.{{ check_id }}.bgp_adv_routes) / pre_check.{{ check_id }}.bgp_adv_routes) * 100 | abs <= 5" fail_msg: "FAIL: the number of advertised routes isn't within 5% of difference" success_msg: "PASS: the number of advertised routes is within 5% of difference" + failed_when: false - name: Compare the number of received routes ansible.builtin.assert: @@ -76,3 +77,4 @@ - "((pre_check.{{ check_id }}.bgp_rec_routes - post_check.{{ check_id }}.bgp_rec_routes) / pre_check.{{ check_id }}.bgp_rec_routes) * 100 | abs <= 5" fail_msg: "FAIL: the number of received routes isn't within 5% of difference" success_msg: "PASS: the number of received routes is within 5% of difference" + failed_when: false