ansible -i hosts linux_vms -m shell -a "/sbin/shutdown -r now" -u 
your_username -K --ssh-extra-args='-o StrictHostKeyChecking=no'

On Monday, March 27, 2023 at 8:22:55 AM UTC-7 Tony Wong wrote:

> I am using follwing command to reboot linux host
>
> ansible -i hosts linux_vms -a "/sbin/shutdown -r now" -Kk 
> --ssh-extra-args='-o StrictHostKeyChecking=no'
>
> but keep getting folowing
>
> Failed to execute operation: Connection timed out
>
> but 
> ansible -i hosts linux_vms -a "uptime" -k --ssh-extra-args='-o 
> StrictHostKeyChecking=no'
>
>
> show the vms are up. any idea?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/14617a18-c036-4347-a58d-5cd1a2aef502n%40googlegroups.com.

Reply via email to