Remove provider (and transport, where applicable) from consideration when not using connection=local (#39555)

* Remove provider (and transport, where applicable) from consideration

* Add tests that misplaced transport does not fail task
This commit is contained in:
Nathaniel Case 2018-05-08 12:06:37 -04:00 committed by GitHub
commit c6270e15a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 48 additions and 2 deletions

View file

@ -23,4 +23,15 @@
provider: "{{ cli }}"
become: no
# Test that transport values are properly ignored
- name: wrong transport specified
eos_command:
commands: show version
transport: eapi
- name: wrong transport specified in provider
eos_command:
commands: show version
provider: "{{ eapi }}"
when: "ansible_connection != 'local'"

View file

@ -0,0 +1,17 @@
---
- debug: msg="START cli/misc_tests.yaml on connection={{ ansible_connection }}"
- block:
# Test that transport values are properly ignored
- name: wrong transport specified
eos_command:
commands: show version
transport: nxapi
- name: wrong transport specified in provider
eos_command:
commands: show version
provider: "{{ nxapi }}"
when: "ansible_connection != 'local'"