mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
860 B
YAML
36 lines
860 B
YAML
8 years ago
|
---
|
||
|
- hosts: ovs
|
||
|
gather_facts: no
|
||
|
remote_user: ubuntu
|
||
|
become: yes
|
||
|
|
||
|
vars:
|
||
|
limit_to: "*"
|
||
|
debug: false
|
||
|
|
||
7 years ago
|
# Run the tests within blocks allows the next module to be tested if the previous one fails.
|
||
7 years ago
|
# This is done to allow https://github.com/ansible/dci-partner-ansible/ to run the full set of tests.
|
||
|
|
||
|
|
||
|
tasks:
|
||
|
- set_fact:
|
||
|
test_failed: false
|
||
7 years ago
|
failed_modules: []
|
||
7 years ago
|
- block:
|
||
|
- include_role:
|
||
|
name: openvswitch_db
|
||
|
when: "limit_to in ['*', 'openvswitch_db']"
|
||
|
rescue:
|
||
7 years ago
|
- set_fact:
|
||
|
failed_modules: "{{ failed_modules }} + [ 'openvswitch_db' ]"
|
||
|
test_failed: true
|
||
7 years ago
|
|
||
|
|
||
|
###########
|
||
7 years ago
|
- debug: var=failed_modules
|
||
|
when: test_failed
|
||
|
|
||
7 years ago
|
- name: Has any previous test failed?
|
||
|
fail:
|
||
|
msg: "One or more tests failed, check log for details"
|
||
7 years ago
|
when: test_failed
|