mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
65ab37cbd3
* Remove provider from each task as it is not required. * Add `authorize: yes` whereever required
35 lines
651 B
YAML
35 lines
651 B
YAML
---
|
|
- debug: msg="START cli/ping.yaml"
|
|
|
|
- name: expected successful ping
|
|
ios_ping: &valid_ip
|
|
dest: '8.8.8.8'
|
|
authorize: yes
|
|
register: esp
|
|
|
|
- name: unexpected unsuccessful ping
|
|
ios_ping: &invalid_ip
|
|
dest: '10.255.255.250'
|
|
timeout: 45
|
|
authorize: yes
|
|
register: uup
|
|
|
|
- name: unexpected successful ping
|
|
ios_ping:
|
|
<<: *valid_ip
|
|
state: 'absent'
|
|
authorize: yes
|
|
register: usp
|
|
|
|
- name: expected unsuccessful ping
|
|
ios_ping:
|
|
<<: *invalid_ip
|
|
state: 'absent'
|
|
authorize: yes
|
|
register: eup
|
|
|
|
- name: assert
|
|
assert:
|
|
that:
|
|
- esp.failed == eup.failed == false
|
|
- usp.failed == uup.failed == true
|