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

65 views
Skip to first unread message

arjungoel 1995

unread,
Feb 2, 2022, 12:29:08 PM2/2/22
to Ansible Project
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
end

Roberto Paz

unread,
Feb 3, 2022, 7:07:31 AM2/3/22
to Ansible Project
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.

arjungoel 1995

unread,
Feb 3, 2022, 7:48:09 AM2/3/22
to ansible...@googlegroups.com, rjr...@gmail.com
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

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ac2f697a-ee8d-483f-b9df-c08f8142a182n%40googlegroups.com.

Stefan Hornburg (Racke)

unread,
Feb 3, 2022, 7:51:16 AM2/3/22
to ansible...@googlegroups.com
On 03/02/2022 13:47, arjungoel 1995 wrote:
> 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


> On Thu, Feb 3, 2022 at 5:37 PM Roberto Paz <rjr...@gmail.com> wrote:
>
> 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.
>
> El miércoles, 2 de febrero de 2022 a la(s) 14:29:08 UTC-3, arjung...@gmail.com escribió:
>
> 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
> end
>
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ac2f697a-ee8d-483f-b9df-c08f8142a182n%40googlegroups.com <https://groups.google.com/d/msgid/ansible-project/ac2f697a-ee8d-483f-b9df-c08f8142a182n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CALh2VP%2B4HhMTofFOuJ%3DuMQdSqzBi1RmJnOK1pgv%2B3wqHgUeGfw%40mail.gmail.com <https://groups.google.com/d/msgid/ansible-project/CALh2VP%2B4HhMTofFOuJ%3DuMQdSqzBi1RmJnOK1pgv%2B3wqHgUeGfw%40mail.gmail.com?utm_medium=email&utm_source=footer>.


--
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration.

OpenPGP_signature

arjungoel 1995

unread,
Feb 3, 2022, 8:23:00 AM2/3/22
to ansible...@googlegroups.com, ra...@linuxia.de
`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?

Thanks

Stefan Hornburg (Racke)

unread,
Feb 3, 2022, 8:29:04 AM2/3/22
to ansible...@googlegroups.com
On 03/02/2022 14:22, arjungoel 1995 wrote:
> `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
> >     To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com <mailto:ansible-project%2Bunsu...@googlegroups.com>.
> >     To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ac2f697a-ee8d-483f-b9df-c08f8142a182n%40googlegroups.com <https://groups.google.com/d/msgid/ansible-project/ac2f697a-ee8d-483f-b9df-c08f8142a182n%40googlegroups.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/ansible-project/ac2f697a-ee8d-483f-b9df-c08f8142a182n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com <mailto:ansible-project%2Bunsu...@googlegroups.com>.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CALh2VP%2B4HhMTofFOuJ%3DuMQdSqzBi1RmJnOK1pgv%2B3wqHgUeGfw%40mail.gmail.com <https://groups.google.com/d/msgid/ansible-project/CALh2VP%2B4HhMTofFOuJ%3DuMQdSqzBi1RmJnOK1pgv%2B3wqHgUeGfw%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/ansible-project/CALh2VP%2B4HhMTofFOuJ%3DuMQdSqzBi1RmJnOK1pgv%2B3wqHgUeGfw%40mail.gmail.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> Ecommerce and Linux consulting + Perl and web application programming.
> Debian and Sympa administration.
>
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com <mailto:ansible-project%2Bunsu...@googlegroups.com>.
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CALh2VPJcjJ6VVwVa02_k9Awp9W37bgyQUU_nELjK%2BLJoCa-%3DEg%40mail.gmail.com <https://groups.google.com/d/msgid/ansible-project/CALh2VPJcjJ6VVwVa02_k9Awp9W37bgyQUU_nELjK%2BLJoCa-%3DEg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
OpenPGP_signature

arjungoel 1995

unread,
Feb 3, 2022, 8:40:12 AM2/3/22
to ansible...@googlegroups.com, ra...@linuxia.de
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.

Stefan Hornburg (Racke)

unread,
Feb 3, 2022, 8:46:42 AM2/3/22
to ansible...@googlegroups.com
On 03/02/2022 14:39, arjungoel 1995 wrote:
> 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*
> >     >     To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com <mailto:ansible-project%2Bunsu...@googlegroups.com> <mailto:ansible-project%2Bunsu...@googlegroups.com <mailto:ansible-project%252Buns...@googlegroups.com>>.
> >     >     To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ac2f697a-ee8d-483f-b9df-c08f8142a182n%40googlegroups.com <https://groups.google.com/d/msgid/ansible-project/ac2f697a-ee8d-483f-b9df-c08f8142a182n%40googlegroups.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/ansible-project/ac2f697a-ee8d-483f-b9df-c08f8142a182n%40googlegroups.com?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/ansible-project/ac2f697a-ee8d-483f-b9df-c08f8142a182n%40googlegroups.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/ansible-project/ac2f697a-ee8d-483f-b9df-c08f8142a182n%40googlegroups.com?utm_medium=email&utm_source=footer>>>.
> >     >
> >     > --
> >     > You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> >     > To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com <mailto:ansible-project%2Bunsu...@googlegroups.com> <mailto:ansible-project%2Bunsu...@googlegroups.com <mailto:ansible-project%252Buns...@googlegroups.com>>.
> >     > To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CALh2VP%2B4HhMTofFOuJ%3DuMQdSqzBi1RmJnOK1pgv%2B3wqHgUeGfw%40mail.gmail.com <https://groups.google.com/d/msgid/ansible-project/CALh2VP%2B4HhMTofFOuJ%3DuMQdSqzBi1RmJnOK1pgv%2B3wqHgUeGfw%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/ansible-project/CALh2VP%2B4HhMTofFOuJ%3DuMQdSqzBi1RmJnOK1pgv%2B3wqHgUeGfw%40mail.gmail.com?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/ansible-project/CALh2VP%2B4HhMTofFOuJ%3DuMQdSqzBi1RmJnOK1pgv%2B3wqHgUeGfw%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/ansible-project/CALh2VP%2B4HhMTofFOuJ%3DuMQdSqzBi1RmJnOK1pgv%2B3wqHgUeGfw%40mail.gmail.com?utm_medium=email&utm_source=footer>>>.
> >
> >
> >     --
> >     Ecommerce and Linux consulting + Perl and web application programming.
> >     Debian and Sympa administration.
> >
> >     --
> >     You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> >     To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com <mailto:ansible-project%2Bunsu...@googlegroups.com> <mailto:ansible-project%2Bunsu...@googlegroups.com <mailto:ansible-project%252Buns...@googlegroups.com>>.
> >     To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9f3e4a8f-61c1-b7fd-5900-9593636b0f2f%40linuxia.de.
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com <mailto:ansible-project%2Bunsu...@googlegroups.com>.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CALh2VPJcjJ6VVwVa02_k9Awp9W37bgyQUU_nELjK%2BLJoCa-%3DEg%40mail.gmail.com <https://groups.google.com/d/msgid/ansible-project/CALh2VPJcjJ6VVwVa02_k9Awp9W37bgyQUU_nELjK%2BLJoCa-%3DEg%40mail.gmail.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/ansible-project/CALh2VPJcjJ6VVwVa02_k9Awp9W37bgyQUU_nELjK%2BLJoCa-%3DEg%40mail.gmail.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> Ecommerce and Linux consulting + Perl and web application programming.
> Debian and Sympa administration.
>
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com <mailto:ansible-project%2Bunsu...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/1c46c2e8-6233-415b-a673-cfdb3920a36b%40linuxia.de.
>
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CALh2VP%2BwYHHpaEdktPHEVEWEaFDVJQBPrUG6Qeegu3y%2BWWof%3DQ%40mail.gmail.com <https://groups.google.com/d/msgid/ansible-project/CALh2VP%2BwYHHpaEdktPHEVEWEaFDVJQBPrUG6Qeegu3y%2BWWof%3DQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
OpenPGP_signature

arjungoel 1995

unread,
Feb 3, 2022, 12:42:54 PM2/3/22
to ansible...@googlegroups.com, ra...@linuxia.de
Can you please tell me how to fix this issue?

John Petro

unread,
Feb 3, 2022, 12:51:25 PM2/3/22
to ansible...@googlegroups.com
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


Reply all
Reply to author
Forward
0 new messages