ansible command to reboot host

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?

ansible -i hosts linux_vms -m shell -a “/sbin/shutdown -r now” -u your_username -K --ssh-extra-args=‘-o StrictHostKeyChecking=no’