Spin Up Jenkins on AWS instance

I can provision the ec2 instance but the setup task fails with the message:

fatal: [54.166.83.128]: UNREACHABLE! => {“changed”: false, “msg”: “Failed to connect to the host via ssh.”, “unreachable”: true}

Any idea how to fix/troubleshoot this issue?

I am newbie to Ansible.

Thanks,
Liora

Sometimes it’s a matter of timing. If it’s sporadically happening, perhaps the ssh connection isn’t happening within the 10 second default used by Ansible. To override this default you need to specify in your config file.