mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 01:55:51 +00:00
Initial commit
This commit is contained in:
commit
aebc1b03fd
4861 changed files with 812621 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
- debug: msg="START common/multiple.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: run multiple commands on remote nodes
|
||||
exos_command:
|
||||
commands:
|
||||
- show version
|
||||
- show ports no-refresh
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == false"
|
||||
- "result.stdout is defined"
|
||||
|
||||
- debug: msg="END common/multiple.yaml on connection={{ ansible_connection }}"
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
- debug: msg="START common/prompt.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: run command that requires answering a prompt
|
||||
exos_command:
|
||||
commands:
|
||||
- command: 'clear license-info'
|
||||
prompt: 'Are you sure.*'
|
||||
answer: 'Yes'
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == false"
|
||||
- "result.stdout is defined"
|
||||
|
||||
- debug: msg="END common/prompt.yaml on connection={{ ansible_connection }}"
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
- debug: msg="START common/single.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: run show version on remote devices
|
||||
exos_command:
|
||||
commands: show version
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == false"
|
||||
- "result.stdout is defined"
|
||||
|
||||
- debug: msg="END common/single.yaml on connection={{ ansible_connection }}"
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
- debug: msg="START common/waitfor.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: run show version and check to see if output contains ExtremeXOS
|
||||
exos_command:
|
||||
commands: show version
|
||||
wait_for: result[0] contains ExtremeXOS
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == false"
|
||||
- "result.stdout is defined"
|
||||
|
||||
- debug: msg="END common/waitfor.yaml on connection={{ ansible_connection }}"
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
- debug: msg="START common/waitfor_multiple.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: run multiple commands and evaluate the output
|
||||
exos_command:
|
||||
commands:
|
||||
- show version
|
||||
- show ports no-refresh
|
||||
wait_for:
|
||||
- result[0] contains ExtremeXOS
|
||||
- result[1] contains 20
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == false"
|
||||
- "result.stdout is defined"
|
||||
|
||||
|
||||
- debug: msg="END common/waitfor_multiple.yaml on connection={{ ansible_connection }}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue