2016-10-28 20:50:29 +02:00
|
|
|
---
|
2018-05-18 00:47:15 +02:00
|
|
|
- debug: msg="START common/invalid.yaml on connection={{ ansible_connection }}"
|
2016-10-28 20:50:29 +02:00
|
|
|
|
|
|
|
- name: run invalid command
|
|
|
|
nxos_command:
|
|
|
|
commands: ['show foo']
|
|
|
|
register: result
|
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.failed == true"
|
|
|
|
|
|
|
|
- name: run commands that include invalid command
|
|
|
|
nxos_command:
|
|
|
|
commands:
|
|
|
|
- show version
|
|
|
|
- show foo
|
|
|
|
register: result
|
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.failed == true"
|
|
|
|
|
2018-05-18 00:47:15 +02:00
|
|
|
- debug: msg="END common/invalid.yaml on connection={{ ansible_connection }}"
|