# Getting Timed Out Error when running the playbook using \`vagrant provision\`

**URL:** <https://forum.ansible.com/t/getting-timed-out-error-when-running-the-playbook-using-vagrant-provision/36279>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [February 2, 2022, 5:29pm UTC](https://forum.ansible.com/t/getting-timed-out-error-when-running-the-playbook-using-vagrant-provision/36279 "2022-02-02T17:29:08Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![arjungoel\_1995](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@arjungoel\_1995](https://forum.ansible.com/u/arjungoel_1995)\
**Post date:** [February 2, 2022, 5:29pm UTC](https://forum.ansible.com/t/getting-timed-out-error-when-running-the-playbook-using-vagrant-provision/36279/1 "2022-02-02T17:29:08Z")

</div>

Hi,

I am trying to run a basic ansible playbook using vagrant provision but while doing so experiencing this error:

I even added the ip in my Vagrantfile:

# -_- mode: ruby -_-

# vi: set ft=ruby :

Vagrant.configure(“2”) do |config|  
config.vm.box = “centos/7”  
**config.vm.network “private\_network”, ip: “172.30.240.1”**  
config.vm.provision “ansible” do |ansible|  
ansible.playbook = “playbook.yaml”  
end

Also I am not able to install ansible on windows using pip and like you know git bash won’t support installation of ansible.  
While I am getting version compatibility issues while trying the same using WSL.

Please help.

Thanks  
Arjun Goel  
But still experiencing the issue.

 ![ansible_timeout_error.PNG](https://us1.discourse-cdn.com/ansible/original/2X/0/0a75e47516c9e580f0f56936f873d66d42d51da2.png)  
end

---

<div class="post-metadata">

**Author:** ![Roberto\_J\_R\_Paz](https://avatars.discourse-cdn.com/v4/letter/r/d2c977/32.png) [@Roberto\_J\_R\_Paz](https://forum.ansible.com/u/Roberto_J_R_Paz)\
**Post date:** [February 3, 2022, 12:07pm UTC](https://forum.ansible.com/t/getting-timed-out-error-when-running-the-playbook-using-vagrant-provision/36279/2 "2022-02-03T12:07:31Z")

</div>

Have you tried to manually run an **ssh** command to that IP address and port? If ssh command also returns a timeout, then that is the main source of the issue.

---

<div class="post-metadata">

**Author:** ![arjungoel\_1995](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@arjungoel\_1995](https://forum.ansible.com/u/arjungoel_1995)\
**Post date:** [February 3, 2022, 12:47pm UTC](https://forum.ansible.com/t/getting-timed-out-error-when-running-the-playbook-using-vagrant-provision/36279/3 "2022-02-03T12:47:46Z")

</div>

Hi, I tried to ping the port and IP address using SSH and getting timeout error. Can you please help me how to fix this?

 ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/a/a6e66b5cef1ca0a0de0cdd52daf38e415f41c4d5.png)

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [February 3, 2022, 12:50pm UTC](https://forum.ansible.com/t/getting-timed-out-error-when-running-the-playbook-using-vagrant-provision/36279/4 "2022-02-03T12:50:54Z")

</div>

> Hi, I tried to ping the port and IP address using SSH and getting timeout error. Can you please help me how to fix this?
> 
> image.png

Does "vagrant ssh" work?

Regards

```
          Racke

```

---

<div class="post-metadata">

**Author:** ![arjungoel\_1995](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@arjungoel\_1995](https://forum.ansible.com/u/arjungoel_1995)\
**Post date:** [February 3, 2022, 1:22pm UTC](https://forum.ansible.com/t/getting-timed-out-error-when-running-the-playbook-using-vagrant-provision/36279/5 "2022-02-03T13:22:35Z")

</div>

`vagrant ssh` is working but when I tried to run the playbook using `ansible-playbook <playbook>` command I am getting a timeout error again.

 ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/b/b4dd2f21232d88fcba7d1ec2a7ef7267c0982d0b.png)

I have checked the /etc/ansible/hosts file and the IP address is there. How I can fix the timeout issue with both ways?

Thanks

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [February 3, 2022, 1:28pm UTC](https://forum.ansible.com/t/getting-timed-out-error-when-running-the-playbook-using-vagrant-provision/36279/6 "2022-02-03T13:28:43Z")

</div>

> `vagrant ssh` is working but when I tried to run the playbook using `ansible-playbook \<playbook\>` command I am getting a timeout error again.
> 
> image.png
> 
> I have checked the /etc/ansible/hosts file and the IP address is there. How I can fix the timeout issue with both ways?

What does `vagrant ssh-config` say? Does it use the IP 172.30.240.1?

I don't think so. Looks like Vagrant didn't set up the IP properly.

Regards

```
          Racke

```

---

<div class="post-metadata">

**Author:** ![arjungoel\_1995](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@arjungoel\_1995](https://forum.ansible.com/u/arjungoel_1995)\
**Post date:** [February 3, 2022, 1:39pm UTC](https://forum.ansible.com/t/getting-timed-out-error-when-running-the-playbook-using-vagrant-provision/36279/7 "2022-02-03T13:39:50Z")

</div>

This is the output I am getting after running `vagrant ssh-config`

 ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/b/b9356ce54a9e88ad30d41bb031f4f3267a39a3c5.png)

Also want to know why I am experiencing the timeout error while running the ansible playbook using ansible-playbook command.

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [February 3, 2022, 1:45pm UTC](https://forum.ansible.com/t/getting-timed-out-error-when-running-the-playbook-using-vagrant-provision/36279/8 "2022-02-03T13:45:53Z")

</div>

> This is the output I am getting after running `vagrant ssh-config`
> 
> image.png
> 
> Also want to know why I am experiencing the timeout error while running the ansible playbook using ansible-playbook command.

Vagrant uses 127.0.0.1 and port 2222.

Ansible uses 172.30.240.1.

Again: \*Vagrant didn't setup \*\*172.30.240.1 properly\*

Regards

```
        Racke

```

---

<div class="post-metadata">

**Author:** ![arjungoel\_1995](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@arjungoel\_1995](https://forum.ansible.com/u/arjungoel_1995)\
**Post date:** [February 3, 2022, 5:42pm UTC](https://forum.ansible.com/t/getting-timed-out-error-when-running-the-playbook-using-vagrant-provision/36279/9 "2022-02-03T17:42:26Z")

</div>

Can you please tell me how to fix this issue?

---

<div class="post-metadata">

**Author:** ![jcpetro](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@jcpetro](https://forum.ansible.com/u/jcpetro)\
**Post date:** [February 3, 2022, 5:50pm UTC](https://forum.ansible.com/t/getting-timed-out-error-when-running-the-playbook-using-vagrant-provision/36279/10 "2022-02-03T17:50:51Z")

</div>

ALso, what version of virtualbox are you using? The newer versions don’t support the 172.\* subnets out of the box anymore. So it could be that as well
