513c75079e
* Add eos and fix tests to run multiple connections * Update tests to report connection * Add missing START messages * Fix unspecified connection * Python 3 updates Exceptions don't have `.message` in Python 3 * Override `become` when using `connection=local` * Slight restructuring to make eapi easier later on * Move eapi toggle to prepare_eos * Pull out connection on eapi tasks
30 lines
648 B
YAML
30 lines
648 B
YAML
---
|
|
- debug: msg="START cli/invalid.yaml on connection={{ ansible_connection }}"
|
|
|
|
- name: run invalid command
|
|
eos_command:
|
|
commands: ['show foo']
|
|
provider: "{{ cli }}"
|
|
register: result
|
|
ignore_errors: yes
|
|
|
|
- assert:
|
|
that:
|
|
- "result.failed == true"
|
|
- "result.msg is defined"
|
|
|
|
- name: run commands that include invalid command
|
|
eos_command:
|
|
commands:
|
|
- show version
|
|
- show foo
|
|
provider: "{{ cli }}"
|
|
register: result
|
|
ignore_errors: yes
|
|
|
|
- assert:
|
|
that:
|
|
- "result.failed == true"
|
|
- "result.msg is defined"
|
|
|
|
- debug: msg="END cli/invalid.yaml on connection={{ ansible_connection }}"
|