mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
649 B
YAML
27 lines
649 B
YAML
7 years ago
|
---
|
||
|
- debug: msg="START cli/misc_tests.yaml on connection={{ ansible_connection }}"
|
||
|
|
||
|
|
||
|
# test become and unbecome
|
||
|
- block:
|
||
|
- name: command that does require become (should fail)
|
||
|
eos_command:
|
||
|
commands: show running-config
|
||
|
provider: "{{ cli }}"
|
||
|
become: no
|
||
|
ignore_errors: yes
|
||
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- 'result.failed == true'
|
||
|
- '"privileged mode required" in result.module_stderr'
|
||
|
|
||
|
- name: command that doesn't require become
|
||
|
eos_command:
|
||
|
commands: show uptime
|
||
|
provider: "{{ cli }}"
|
||
|
become: no
|
||
|
|
||
|
when: "ansible_connection != 'local'"
|