title: Ansible time out on Vagrant
body: <p>I have been trying to use my YML file on the Vagrant box I built, which is CentOS. However, I am running into this timeout at ALL times:</p>
  
  <pre><code>ryan@ryan-Galago-UltraPro:~/Desktop/vagrant$ vagrant provision
  [default] Running provisioner: ansible...
  
  PLAY [Show off some basic Ansible features] *********************************** 
  
  GATHERING FACTS *************************************************************** 
  &lt;10.0.x.x&gt; ESTABLISH CONNECTION FOR USER: vagrant
  &lt;10.0.x.x&gt; REMOTE_MODULE setup
  &lt;10.0.x.x&gt; EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/home/ryan/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'Port=2222', '-o', 'IdentityFile=/home/ryan/.vagrant.d/insecure_private_key', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'User=vagrant', '-o', 'ConnectTimeout=10', '10.0.x.x', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1441243799.45-82681900071220 &amp;&amp; echo $HOME/.ansible/tmp/ansible-tmp-1441243799.45-82681900071220'"]
  fatal: [default] =&gt; SSH encountered an unknown error. The output was:
  OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
  debug1: Reading configuration data /home/ryan/.ssh/config
  debug1: Reading configuration data /etc/ssh/ssh_config
  debug1: /etc/ssh/ssh_config line 19: Applying options for *
  debug1: auto-mux: Trying existing master
  debug1: Control socket "/home/ryan/.ansible/cp/ansible-ssh-10.0.x.x-2222-vagrant" does not exist
  debug2: ssh_connect: needpriv 0
  debug1: Connecting to 10.0.x.x [10.0.x.x] port 2222.
  debug2: fd 3 setting O_NONBLOCK
  debug1: connect to address 10.0.x.x port 2222: Connection timed out
  ssh: connect to host 10.0.x.x port 2222: Connection timed out
  
  
  TASK: [common | Install postgres] ********************************************* 
  FATAL: no hosts matched or all hosts have already failed -- aborting
  
  
  PLAY RECAP ******************************************************************** 
             to retry, use: --limit @/home/ryan/site.retry
  
  default                    : ok=0    changed=0    unreachable=1    failed=0   
  
  Ansible failed to complete successfully. Any error output should be
  visible above. Please fix these errors and try again.
  </code></pre>
  
  <p>I have looked all over the Internet to figure out why it keeps Timing out and came up nothing, so I am asking StackOverFlow for any type of suggestions. Here is what my VagrantFile looks like:</p>
  
  <pre><code>VAGRANTFILE_API_VERSION = "2"
  
  Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
    # All Vagrant configuration is done here. The most common configuration
    # options are documented and commented below. For a complete reference,
    # please see the online documentation at vagrantup.com.
  
    # Every Vagrant virtual environment requires a box to build off of.
    config.vm.box = "cento"
  
    config.vm.provision "ansible" do |ansible|
          ansible.groups = {
                  "vagrant" =&gt; ["10.0.x.x"]
          }
          ansible.extra_vars = { ansible_ssh_user: "vagrant" }
          ansible.sudo = true
          ansible.verbose = "vvvv"
          ansible.playbook = "site.yml"
          ansible.inventory_path = "hosts"
    end
  end
  </code></pre>
  
  <p>And my host file I am using:</p>
  
  <pre><code>[vagrant]
  default ansible_ssh_host=10.0.x.x ansible_ssh_user=vagrant ansible_ssh_port=2222
  </code></pre>
  
  <p>Does anyone have any reason why when I run <code>vagrant provision</code>, it times out on me?</p>
  
  <p>Update:
  I have tried just using the default vagrant host file:</p>
  
  <pre><code> Generated by Vagrant
  
  default ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222
  </code></pre>
  
  <p>Is there a way to change the default ansible_ssh_host from the loopback address to it's actual IP?</p>