ansible/test/integration/targets/ios_smoke/tests/cli/misc_tests.yaml
Paul Belanger 07e1bd8fe7
Fix ios_smoke failure (#57665)
Set ansible_buffer_read_timeout to be larger then
ansible_command_timeout, as both appliance / controller are on the same
physical network and we are not triggering ansible_command_timeout.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-06-11 10:52:54 -04:00

41 lines
1,023 B
YAML

---
- debug: msg="START ios_smoke cli/misc_tests.yaml on connection={{ ansible_connection }}"
# hit network.ios.ios- get_defaults_flag()
- name: setup
ios_config:
commands:
- no description
- shutdown
parents:
- interface Loopback999
match: none
provider: "{{ cli }}"
- name: configure device with defaults included
ios_config:
src: defaults/config.j2
defaults: yes
provider: "{{ cli }}"
register: result
- name: run ios commands to test command_timeout
ios_command:
commands:
- show running-config all
- show interfaces
- show running-config all
vars:
ansible_command_timeout: 1
ansible_buffer_read_timeout: 2
ignore_errors: True
register: result
when: ansible_connection == 'network_cli'
- assert:
that:
- 'result.failed == true'
- "'timeout value 1 seconds reached' in result.msg"
when: ansible_connection == 'network_cli'
- debug: msg="END ios_smoke cli/misc_tests.yaml on connection={{ ansible_connection }}"