Fix nxos_facts for nxapi transport (#23302)

* Partial revert of 2e476e64cd

This broke handling of nxos_facts over nxapi

* Fix nxos_facts tests not run in isolation
This commit is contained in:
Nathaniel Case 2017-04-05 11:47:37 -04:00 committed by GitHub
commit d890167575
2 changed files with 43 additions and 16 deletions

View file

@ -8,8 +8,21 @@
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
- name: enable nxapi
nxos_config:
lines:
- feature nxapi
- nxapi http port 80
provider: "{{ cli }}"
- name: run test case
include: "{{ test_case_to_run }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: disable nxapi
nxos_config:
lines:
- no feature nxapi
provider: "{{ cli }}"