mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
When running all network tests at once, list the ones that failed at the end. (#27075)
* list failed tests for iosxr * list failed tests for ovs * list failed tests for junos * list failed tests for ios * list failed tests for eos * list failed tests for nxos * list failed tests for vyos
This commit is contained in:
parent
7694fd6f9f
commit
039706a239
7 changed files with 239 additions and 78 deletions
|
@ -14,78 +14,100 @@
|
||||||
tasks:
|
tasks:
|
||||||
- set_fact:
|
- set_fact:
|
||||||
test_failed: false
|
test_failed: false
|
||||||
|
failed_modules: []
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: eos_banner
|
name: eos_banner
|
||||||
when: "limit_to in ['*', 'eos_banner']"
|
when: "limit_to in ['*', 'eos_banner']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'eos_banner' ]"
|
||||||
|
test_failed: true
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: eos_command
|
name: eos_command
|
||||||
when: "limit_to in ['*', 'eos_command']"
|
when: "limit_to in ['*', 'eos_command']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'eos_command' ]"
|
||||||
|
test_failed: true
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: eos_config
|
name: eos_config
|
||||||
when: "limit_to in ['*', 'eos_config']"
|
when: "limit_to in ['*', 'eos_config']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'eos_config' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: eos_template
|
name: eos_template
|
||||||
when: "limit_to in ['*', 'eos_template']"
|
when: "limit_to in ['*', 'eos_template']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'eos_template' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: eos_facts
|
name: eos_facts
|
||||||
when: "limit_to in ['*', 'eos_facts']"
|
when: "limit_to in ['*', 'eos_facts']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'eos_facts' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: eos_eapi
|
name: eos_eapi
|
||||||
when: "limit_to in ['*', 'eos_eapi']"
|
when: "limit_to in ['*', 'eos_eapi']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'eos_eapi' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: eos_system
|
name: eos_system
|
||||||
when: "limit_to in ['*', 'eos_system']"
|
when: "limit_to in ['*', 'eos_system']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'eos_system' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: eos_user
|
name: eos_user
|
||||||
when: "limit_to in ['*', 'eos_user']"
|
when: "limit_to in ['*', 'eos_user']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'eos_user' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: eos_vlan
|
name: eos_vlan
|
||||||
when: "limit_to in ['*', 'eos_vlan']"
|
when: "limit_to in ['*', 'eos_vlan']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'eos_vlan' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: eos_vrf
|
name: eos_vrf
|
||||||
when: "limit_to in ['*', 'eos_vrf']"
|
when: "limit_to in ['*', 'eos_vrf']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'eos_vrf' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
|
|
||||||
###########
|
###########
|
||||||
|
- debug: var=failed_modules
|
||||||
|
when: test_failed
|
||||||
|
|
||||||
- name: Has any previous test failed?
|
- name: Has any previous test failed?
|
||||||
fail:
|
fail:
|
||||||
msg: "One or more tests failed, check log for details"
|
msg: "One or more tests failed, check log for details"
|
||||||
|
|
|
@ -13,71 +13,92 @@
|
||||||
tasks:
|
tasks:
|
||||||
- set_fact:
|
- set_fact:
|
||||||
test_failed: false
|
test_failed: false
|
||||||
|
failed_modules: []
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: ios_banner
|
name: ios_banner
|
||||||
when: "limit_to in ['*', 'ios_banner']"
|
when: "limit_to in ['*', 'ios_banner']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'ios_banner' ]"
|
||||||
|
test_failed: true
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: ios_command
|
name: ios_command
|
||||||
when: "limit_to in ['*', 'ios_command']"
|
when: "limit_to in ['*', 'ios_command']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'ios_command' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: ios_config
|
name: ios_config
|
||||||
when: "limit_to in ['*', 'ios_config']"
|
when: "limit_to in ['*', 'ios_config']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'ios_config' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: ios_facts
|
name: ios_facts
|
||||||
when: "limit_to in ['*', 'ios_facts']"
|
when: "limit_to in ['*', 'ios_facts']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'ios_facts' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: ios_template
|
name: ios_template
|
||||||
when: "limit_to in ['*', 'ios_template']"
|
when: "limit_to in ['*', 'ios_template']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'ios_template' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: ios_system
|
name: ios_system
|
||||||
when: "limit_to in ['*', 'ios_system']"
|
when: "limit_to in ['*', 'ios_system']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'ios_system' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: ios_user
|
name: ios_user
|
||||||
when: "limit_to in ['*', 'ios_user']"
|
when: "limit_to in ['*', 'ios_user']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'ios_user' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: ios_static_route
|
name: ios_static_route
|
||||||
when: "limit_to in ['*', 'ios_static_route']"
|
when: "limit_to in ['*', 'ios_static_route']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'ios_static_route' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: ios_logging
|
name: ios_logging
|
||||||
when: "limit_to in ['*', 'ios_logging']"
|
when: "limit_to in ['*', 'ios_logging']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'ios_logging' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
|
|
||||||
###########
|
###########
|
||||||
|
- debug: var=failed_modules
|
||||||
|
when: test_failed
|
||||||
|
|
||||||
- name: Has any previous test failed?
|
- name: Has any previous test failed?
|
||||||
fail:
|
fail:
|
||||||
msg: "One or more tests failed, check log for details"
|
msg: "One or more tests failed, check log for details"
|
||||||
|
|
|
@ -14,63 +14,83 @@
|
||||||
tasks:
|
tasks:
|
||||||
- set_fact:
|
- set_fact:
|
||||||
test_failed: false
|
test_failed: false
|
||||||
|
failed_modules: []
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: iosxr_command
|
name: iosxr_command
|
||||||
when: "limit_to in ['*', 'iosxr_command']"
|
when: "limit_to in ['*', 'iosxr_command']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'iosxr_command' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: iosxr_config
|
name: iosxr_config
|
||||||
when: "limit_to in ['*', 'iosxr_config']"
|
when: "limit_to in ['*', 'iosxr_config']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'iosxr_config' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: iosxr_facts
|
name: iosxr_facts
|
||||||
when: "limit_to in ['*', 'iosxr_facts']"
|
when: "limit_to in ['*', 'iosxr_facts']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'iosxr_facts' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: iosxr_template
|
name: iosxr_template
|
||||||
when: "limit_to in ['*', 'iosxr_template']"
|
when: "limit_to in ['*', 'iosxr_template']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'iosxr_template' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: iosxr_system
|
name: iosxr_system
|
||||||
when: "limit_to in ['*', 'iosxr_system']"
|
when: "limit_to in ['*', 'iosxr_system']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
test_failed: true
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'iosxr_system' ]"
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: iosxr_user
|
name: iosxr_user
|
||||||
when: "limit_to in ['*', 'iosxr_user']"
|
when: "limit_to in ['*', 'iosxr_user']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'iosxr_user' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: iosxr_banner
|
name: iosxr_banner
|
||||||
when: "limit_to in ['*', 'iosxr_banner']"
|
when: "limit_to in ['*', 'iosxr_banner']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'iosxr_banner' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: iosxr_logging
|
name: iosxr_logging
|
||||||
when: "limit_to in ['*', 'iosxr_logging']"
|
when: "limit_to in ['*', 'iosxr_logging']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'iosxr_logging' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
###########
|
###########
|
||||||
|
- debug: var=failed_modules
|
||||||
|
when: test_failed
|
||||||
|
|
||||||
- name: Has any previous test failed?
|
- name: Has any previous test failed?
|
||||||
fail:
|
fail:
|
||||||
msg: "One or more tests failed, check log for details"
|
msg: "One or more tests failed, check log for details"
|
||||||
|
|
|
@ -15,126 +15,160 @@
|
||||||
tasks:
|
tasks:
|
||||||
- set_fact:
|
- set_fact:
|
||||||
test_failed: false
|
test_failed: false
|
||||||
|
failed_modules: []
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: junos_command
|
name: junos_command
|
||||||
when: "limit_to in ['*', 'junos_command']"
|
when: "limit_to in ['*', 'junos_command']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'junos_command' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: junos_config
|
name: junos_config
|
||||||
when: "limit_to in ['*', 'junos_config']"
|
when: "limit_to in ['*', 'junos_config']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'junos_config' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: junos_facts
|
name: junos_facts
|
||||||
when: "limit_to in ['*', 'junos_facts']"
|
when: "limit_to in ['*', 'junos_facts']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'junos_facts' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: junos_netconf
|
name: junos_netconf
|
||||||
when: "limit_to in ['*', 'junos_netconf']"
|
when: "limit_to in ['*', 'junos_netconf']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'junos_netconf' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: junos_rpc
|
name: junos_rpc
|
||||||
when: "limit_to in ['*', 'junos_rpc']"
|
when: "limit_to in ['*', 'junos_rpc']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'junos_rpc' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: junos_template
|
name: junos_template
|
||||||
when: "limit_to in ['*', 'junos_template']"
|
when: "limit_to in ['*', 'junos_template']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'junos_template' ]"
|
||||||
|
test_failed: true
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: junos_vlan
|
name: junos_vlan
|
||||||
when: "limit_to in ['*', 'junos_vlan']"
|
when: "limit_to in ['*', 'junos_vlan']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'junos_vlan' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: junos_interface
|
name: junos_interface
|
||||||
when: "limit_to in ['*', 'junos_interface']"
|
when: "limit_to in ['*', 'junos_interface']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'junos_interface' ]"
|
||||||
|
test_failed: true
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: junos_banner
|
name: junos_banner
|
||||||
when: "limit_to in ['*', 'junos_banner']"
|
when: "limit_to in ['*', 'junos_banner']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'junos_banner' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: junos_system
|
name: junos_system
|
||||||
when: "limit_to in ['*', 'junos_system']"
|
when: "limit_to in ['*', 'junos_system']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'junos_system' ]"
|
||||||
|
test_failed: true
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: junos_logging
|
name: junos_logging
|
||||||
when: "limit_to in ['*', 'junos_logging']"
|
when: "limit_to in ['*', 'junos_logging']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'junos_logging' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: junos_user
|
name: junos_user
|
||||||
when: "limit_to in ['*', 'junos_user']"
|
when: "limit_to in ['*', 'junos_user']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'junos_user' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: junos_static_route
|
name: junos_static_route
|
||||||
when: "limit_to in ['*', 'junos_static_route']"
|
when: "limit_to in ['*', 'junos_static_route']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'junos_static_route' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: junos_linkagg
|
name: junos_linkagg
|
||||||
when: "limit_to in ['*', 'junos_linkagg']"
|
when: "limit_to in ['*', 'junos_linkagg']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'junos_linkagg' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: junos_l3_interface
|
name: junos_l3_interface
|
||||||
when: "limit_to in ['*', 'junos_l3_interface']"
|
when: "limit_to in ['*', 'junos_l3_interface']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'junos_l3_interface' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: junos_lldp
|
name: junos_lldp
|
||||||
when: "limit_to in ['*', 'junos_lldp']"
|
when: "limit_to in ['*', 'junos_lldp']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'junos_lldp' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: junos_lldp_interface
|
name: junos_lldp_interface
|
||||||
when: "limit_to in ['*', 'junos_lldp_interface']"
|
when: "limit_to in ['*', 'junos_lldp_interface']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'junos_lldp_interface' ]"
|
||||||
|
test_failed: true
|
||||||
###########
|
###########
|
||||||
|
- debug: var=failed_modules
|
||||||
|
when: test_failed
|
||||||
|
|
||||||
- name: Has any previous test failed?
|
- name: Has any previous test failed?
|
||||||
fail:
|
fail:
|
||||||
msg: "One or more tests failed, check log for details"
|
msg: "One or more tests failed, check log for details"
|
||||||
|
|
|
@ -14,105 +14,137 @@
|
||||||
tasks:
|
tasks:
|
||||||
- set_fact:
|
- set_fact:
|
||||||
test_failed: false
|
test_failed: false
|
||||||
|
failed_modules: []
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: nxos_command
|
name: nxos_command
|
||||||
when: "limit_to in ['*', 'nxos_command']"
|
when: "limit_to in ['*', 'nxos_command']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'nxos_command' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: nxos_config
|
name: nxos_config
|
||||||
when: "limit_to in ['*', 'nxos_config']"
|
when: "limit_to in ['*', 'nxos_config']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'nxos_config' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: nxos_facts
|
name: nxos_facts
|
||||||
when: "limit_to in ['*', 'nxos_facts']"
|
when: "limit_to in ['*', 'nxos_facts']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'nxos_facts' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: nxos_template
|
name: nxos_template
|
||||||
when: "limit_to in ['*', 'nxos_template']"
|
when: "limit_to in ['*', 'nxos_template']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'nxos_template' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: nxos_nxapi
|
name: nxos_nxapi
|
||||||
when: "limit_to in ['*', 'nxos_nxapi']"
|
when: "limit_to in ['*', 'nxos_nxapi']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'nxos_nxapi' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: nxos_evpn_global
|
name: nxos_evpn_global
|
||||||
when: "limit_to in ['*', 'nxos_evpn_global']"
|
when: "limit_to in ['*', 'nxos_evpn_global']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'nxos_evpn_global' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: nxos_feature
|
name: nxos_feature
|
||||||
when: "limit_to in ['*', 'nxos_feature']"
|
when: "limit_to in ['*', 'nxos_feature']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'nxos_feature' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: nxos_mtu
|
name: nxos_mtu
|
||||||
when: "limit_to in ['*', 'nxos_mtu']"
|
when: "limit_to in ['*', 'nxos_mtu']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'nxos_mtu' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: nxos_system
|
name: nxos_system
|
||||||
when: "limit_to in ['*', 'nxos_system']"
|
when: "limit_to in ['*', 'nxos_system']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'nxos_system' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: nxos_interface
|
name: nxos_interface
|
||||||
when: "limit_to in ['*', 'nxos_interface']"
|
when: "limit_to in ['*', 'nxos_interface']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'nxos_interface' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: nxos_user
|
name: nxos_user
|
||||||
when: "limit_to in ['*', 'nxos_user']"
|
when: "limit_to in ['*', 'nxos_user']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'nxos_user' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: nxos_banner
|
name: nxos_banner
|
||||||
when: "limit_to in ['*', 'nxos_banner']"
|
when: "limit_to in ['*', 'nxos_banner']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'nxos_banner' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: nxos_acl
|
name: nxos_acl
|
||||||
when: "limit_to in ['*', 'nxos_acl']"
|
when: "limit_to in ['*', 'nxos_acl']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'nxos_acl' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: nxos_acl_interface
|
name: nxos_acl_interface
|
||||||
when: "limit_to in ['*', 'nxos_acl_interface']"
|
when: "limit_to in ['*', 'nxos_acl_interface']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'nxos_acl_interface' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
###########
|
###########
|
||||||
|
- debug: var=failed_modules
|
||||||
|
when: test_failed
|
||||||
|
|
||||||
- name: Has any previous test failed?
|
- name: Has any previous test failed?
|
||||||
fail:
|
fail:
|
||||||
msg: "One or more tests failed, check log for details"
|
msg: "One or more tests failed, check log for details"
|
||||||
|
|
|
@ -15,16 +15,22 @@
|
||||||
tasks:
|
tasks:
|
||||||
- set_fact:
|
- set_fact:
|
||||||
test_failed: false
|
test_failed: false
|
||||||
|
failed_modules: []
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: openvswitch_db
|
name: openvswitch_db
|
||||||
_raw_params: openvswitch_db
|
_raw_params: openvswitch_db
|
||||||
when: "limit_to in ['*', 'openvswitch_db']"
|
when: "limit_to in ['*', 'openvswitch_db']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'openvswitch_db' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
|
|
||||||
###########
|
###########
|
||||||
|
- debug: var=failed_modules
|
||||||
|
when: test_failed
|
||||||
|
|
||||||
- name: Has any previous test failed?
|
- name: Has any previous test failed?
|
||||||
fail:
|
fail:
|
||||||
msg: "One or more tests failed, check log for details"
|
msg: "One or more tests failed, check log for details"
|
||||||
|
|
|
@ -14,84 +14,110 @@
|
||||||
tasks:
|
tasks:
|
||||||
- set_fact:
|
- set_fact:
|
||||||
test_failed: false
|
test_failed: false
|
||||||
|
failed_modules: []
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: vyos_command
|
name: vyos_command
|
||||||
when: "limit_to in ['*', 'vyos_command']"
|
when: "limit_to in ['*', 'vyos_command']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'vyos_command' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: vyos_config
|
name: vyos_config
|
||||||
when: "limit_to in ['*', 'vyos_config']"
|
when: "limit_to in ['*', 'vyos_config']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'vyos_config' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: vyos_user
|
name: vyos_user
|
||||||
when: "limit_to in ['*', 'vyos_user']"
|
when: "limit_to in ['*', 'vyos_user']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'vyos_user' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: vyos_banner
|
name: vyos_banner
|
||||||
when: "limit_to in ['*', 'vyos_banner']"
|
when: "limit_to in ['*', 'vyos_banner']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'vyos_banner' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: vyos_linkagg
|
name: vyos_linkagg
|
||||||
when: "limit_to in ['*', 'vyos_linkagg']"
|
when: "limit_to in ['*', 'vyos_linkagg']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'vyos_linkagg' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: vyos_static_route
|
name: vyos_static_route
|
||||||
when: "limit_to in ['*', 'vyos_static_route']"
|
when: "limit_to in ['*', 'vyos_static_route']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'vyos_static_route' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: vyos_l3_interface
|
name: vyos_l3_interface
|
||||||
when: "limit_to in ['*', 'vyos_l3_interface']"
|
when: "limit_to in ['*', 'vyos_l3_interface']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'vyos_l3_interface' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: vyos_logging
|
name: vyos_logging
|
||||||
when: "limit_to in ['*', 'vyos_logging']"
|
when: "limit_to in ['*', 'vyos_logging']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'vyos_logging' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: vyos_lldp
|
name: vyos_lldp
|
||||||
when: "limit_to in ['*', 'vyos_lldp']"
|
when: "limit_to in ['*', 'vyos_lldp']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'vyos_lldp' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: vyos_lldp_interface
|
name: vyos_lldp_interface
|
||||||
when: "limit_to in ['*', 'vyos_lldp_interface']"
|
when: "limit_to in ['*', 'vyos_lldp_interface']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'vyos_lldp_interface' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: vyos_interface
|
name: vyos_interface
|
||||||
when: "limit_to in ['*', 'vyos_interface']"
|
when: "limit_to in ['*', 'vyos_interface']"
|
||||||
rescue:
|
rescue:
|
||||||
- set_fact: test_failed=true
|
- set_fact:
|
||||||
|
failed_modules: "{{ failed_modules }} + [ 'vyos_interface' ]"
|
||||||
|
test_failed: true
|
||||||
|
|
||||||
###########
|
###########
|
||||||
|
- debug: var=failed_modules
|
||||||
|
when: test_failed
|
||||||
|
|
||||||
- name: Has any previous test failed?
|
- name: Has any previous test failed?
|
||||||
fail:
|
fail:
|
||||||
msg: "One or more tests failed, check log for details"
|
msg: "One or more tests failed, check log for details"
|
||||||
|
|
Loading…
Reference in a new issue