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

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.


end

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.

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?

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

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

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

`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

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

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

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

Can you please tell me how to fix this issue?

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