How to configure fact caching in Ansible

0 votes

How do I store gathered facts or inventory source data without the performance hit of retrieving them from source?

Jan 24, 2019 in Ansible by Gargi
4,028 views

1 answer to this question.

0 votes

There are two cache plugins: redis and jsonfile.

To configure fact caching using redis, enable it in ansible.cfg as follows:

[defaults]
gathering = smart
fact_caching = redis
fact_caching_timeout = 86400
# seconds

To get redis up and running, perform the equivalent OS commands:

yum install redis
service redis start
pip install redis
answered Jan 24, 2019 by Kennedy

Related Questions In Ansible

0 votes
1 answer

How to configure the Nginx server in AWS with Ansible Playbook?

Hi@akhtar, To configure the Nginx server in AWS, ...READ MORE

answered Oct 12, 2020 in Ansible by MD
• 95,460 points
3,035 views
0 votes
1 answer

How to regex replace nested values in Ansible

I'm not aware of any built-in method ...READ MORE

answered Jun 17, 2018 in Ansible by shubham
• 7,340 points
5,503 views
0 votes
1 answer

How to ignore failed commands in Ansible?

Usually, if even one command fails to ...READ MORE

answered Feb 7, 2019 in Ansible by Patt
15,682 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,036 views
+2 votes
1 answer
0 votes
2 answers

How to enable Inventory Cache plugin in Ansible?

Adding to @Farookh's answer, if the inventory ...READ MORE

answered Feb 20, 2019 in Ansible by Shalaka
2,384 views
0 votes
1 answer

How do I wget a file from web server using shell in the ansible playbook

Hey Ayaan, you could probably use this ...READ MORE

answered Jan 24, 2019 in Ansible by Anushri
4,155 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP