2018-02-13 17:53:50 +01:00
|
|
|
---
|
|
|
|
- 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
|
|
|
|
|
2018-07-20 06:34:53 +02:00
|
|
|
- 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
|
2019-06-11 16:52:54 +02:00
|
|
|
ansible_buffer_read_timeout: 2
|
2018-07-20 06:34:53 +02:00
|
|
|
ignore_errors: True
|
|
|
|
register: result
|
|
|
|
when: ansible_connection == 'network_cli'
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- 'result.failed == true'
|
2019-06-11 16:52:54 +02:00
|
|
|
- "'timeout value 1 seconds reached' in result.msg"
|
2018-07-20 06:34:53 +02:00
|
|
|
when: ansible_connection == 'network_cli'
|
|
|
|
|
2018-02-13 17:53:50 +01:00
|
|
|
- debug: msg="END ios_smoke cli/misc_tests.yaml on connection={{ ansible_connection }}"
|