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