2018-03-09 15:03:33 +01:00
|
|
|
---
|
|
|
|
- debug: msg="START connection={{ ansible_connection }} common/misc_tests.yaml"
|
|
|
|
- debug: msg="Using provider={{ connection.transport }}"
|
|
|
|
when: ansible_connection == "local"
|
|
|
|
|
|
|
|
- name: hit conditional for lists of 10 or more commands
|
|
|
|
nxos_command:
|
|
|
|
commands:
|
|
|
|
- show hostname
|
|
|
|
- show hostname
|
|
|
|
- show hostname
|
|
|
|
- show hostname
|
|
|
|
- show hostname
|
|
|
|
- show hostname
|
|
|
|
- show hostname
|
|
|
|
- show hostname
|
|
|
|
- show hostname
|
|
|
|
- show hostname
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- result.stdout|length == 10
|
2018-05-15 17:55:47 +02:00
|
|
|
|
|
|
|
- name: combine with provider
|
|
|
|
nxos_command:
|
|
|
|
commands:
|
|
|
|
- show hostname
|
|
|
|
provider: "{{ connection | combine({'timeout': 500}) }}"
|