Posted in Ansible

Timeout Error while Gathering Facts using Ansible Playbook

If you are getting timeout error while executing dry-run or actual deployment like following that means ansible is taking a long time to gather facts from managed hosts.

Generally, you will get an error like “Timer expired after 10 seconds”.

Timout Error

The solution to solve this issue is to add a gather_timeout parameter to 30 secs in an ansible configuration file. (ansible.cfg). You can try different values of gather_timeout if you are still getting timeout error.

ansible.cfg file

After adding this parameter you will not get issue during Gathering Facts task.

facts gathering

If you do not want to gather facts every time ansible runs then you can use gather_facts = no in ansible.cfg file.

Advertisement

Author:

I have created this blog to share my learning from IT world. Hope you find it useful in your day to day work. Feel free to send me your feedback about my blog.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.