Ansible Timeout (12s) waiting for privilege escalation prompt
<p>I'm having trouble running my Ansible playbook on AWS instance. Here is my version:</p>

<pre><code>$ ansible --version
ansible 2.0.0.2
</code></pre>

<p>I created an inventory file as:</p>

<pre><code>[my_ec2_instance]
default ansible_host=MY_EC2_ADDRESS ansible_user='ubuntu' ansible_ssh_private_key_file='/home/MY_USER/MY_KEYS/MY_KEY.pem'
</code></pre>

<p>Testing connection to my server:</p>

<pre><code>$ ansible -i provisioner/inventory my_ec2_instance -m ping
default | SUCCESS =&gt; {
    "changed": false, 
    "ping": "pong"
}
</code></pre>

<p>Now when running my playbook on this inventory I get the error <code>Timeout (12s) waiting for privilege escalation prompt</code> as follows:</p>

<pre><code>$ ansible-playbook -i provisioner/inventory -l my_ec2_instance provisioner/playbook.yml

PLAY [Ubuntu14/Python3/Postgres/Nginx/Gunicorn/Django stack] *****

TASK [setup] *******************************************************************
fatal: [default]: FAILED! =&gt; {"failed": true, "msg": "ERROR! Timeout (12s) waiting for privilege escalation prompt: "}

NO MORE HOSTS LEFT *************************************************************

PLAY RECAP *********************************************************************
default                    : ok=0    changed=0    unreachable=0    failed=1
</code></pre>

<p>If I run the same playbook using the <code>.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory</code> as the inventory parameter it works perfectly on my Vagrant instance.(I believe, proving there is nothing wrong in the playbook/roles itself)</p>

<p>Also, if I run it with an <code>-vvvv</code>, copy the <code>exec ssh</code> line and run it manually it indeed connects to AWS without problems.</p>

<p>Do I need to add any other parameter on my inventory file to connect an EC2 instance? What am I missing?</p>