mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
40 lines
982 B
YAML
40 lines
982 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
|
|
ignore_errors: True
|
|
register: result
|
|
when: ansible_connection == 'network_cli'
|
|
|
|
- assert:
|
|
that:
|
|
- 'result.failed == true'
|
|
- "'command timeout triggered' in result.msg"
|
|
when: ansible_connection == 'network_cli'
|
|
|
|
- debug: msg="END ios_smoke cli/misc_tests.yaml on connection={{ ansible_connection }}"
|