ansible/test/integration/targets/junos_command/tests/cli/cli_commmand.yaml
Ganesh Nalawade 24d112fc60
Fix cli_command junos test failure and update doc (#44021)
* Fix cli_command junos test failure and update doc

*  Fix cli_command module integration test failure
   for junos
*  Update cli_command module doc for prompt and
   config command run scenario's

* Update cli_command module doc
2018-08-13 11:02:43 +05:30

33 lines
753 B
YAML

---
- debug:
msg: "START cli/cli_command.yaml on connection={{ ansible_connection }}"
- block:
- name: get output for single command
cli_command:
command: show version
register: result
- assert:
that:
- "result.changed == false"
- "result.stdout is defined"
- name: test with prompt and answer
cli_command:
command: "{{ item }}"
prompt:
- "Exit with uncommitted changes"
answer: yes
loop:
- configure
- set system syslog file test any any
- exit
register: result
- assert:
that:
- "result.changed == false"
when: ansible_connection == 'network_cli'
- debug: msg="END cli/cli_command.yaml on connection={{ ansible_connection }}"