2018-04-06 14:16:07 +02:00
|
|
|
---
|
|
|
|
- name: collect all cli test cases
|
|
|
|
find:
|
|
|
|
paths: "{{ role_path }}/tests/cli"
|
|
|
|
patterns: "{{ testcase }}.yaml"
|
|
|
|
register: test_cases
|
|
|
|
delegate_to: localhost
|
|
|
|
|
|
|
|
- name: set test_items
|
|
|
|
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
|
|
|
|
|
|
|
- name: run test cases (connection=network_cli)
|
|
|
|
include: "{{ test_case_to_run }} ansible_connection=network_cli"
|
|
|
|
with_items: "{{ test_items }}"
|
|
|
|
loop_control:
|
|
|
|
loop_var: test_case_to_run
|
2019-12-18 19:32:56 +01:00
|
|
|
tags: connection_network_cli
|
2018-04-06 14:16:07 +02:00
|
|
|
|
2018-05-30 14:40:28 +02:00
|
|
|
- name: run test cases (connection=local)
|
2018-04-06 14:16:07 +02:00
|
|
|
include: "{{ test_case_to_run }} ansible_connection=local ansible_become=no"
|
2018-05-18 00:47:15 +02:00
|
|
|
with_items: "{{ test_items }}"
|
2018-04-06 14:16:07 +02:00
|
|
|
loop_control:
|
|
|
|
loop_var: test_case_to_run
|
2019-12-18 19:32:56 +01:00
|
|
|
tags: connection_local
|