Hi there, I am wondering if there is other playbook that could reboot an Aruba switch and wait for it to be alive or any one that could advise what did I miss on this playbook so that it will wait for the switch to be up and running. The second task did not execute at all after reboot task. Hope someone could share their experience on this.
## Reboot Switch
---
- hosts: aoscx_6300
roles:
- role: arubanetworks.aoscx_role
gather_facts: false
vars:
ansible_connection: network_cli
ansible_network_os: aoscx
ansible_python_interpreter: /usr/bin/python3
ansible_command_timeout: 240
tasks:
- name: reboot device
aoscx_command:
commands:
- command: 'boot system'
prompt:
- '.*\(y\/n\)\?.*'
answer:
- y
- name: Execute show version command
aoscx_command:
commands: ['show version']
register: show_version_output
- name: Output registered variable
debug:
var: show_version_output
Thank you.