How to enable Inventory Cache plugin in Ansible?

0 votes
I'm working on an Ansible project. I'm a noob at Ansible and I am asked to enable inventory cache plugin, apparently, it's disabled.

How do I do that?
Feb 19 in Ansible by Prakash
204 views

2 answers to this question.

0 votes

Hey @Prakash, Inventory cache plugin is disabled by default, you explicitly have to enable it. 

You can enable it using the environment variable

export ANSIBLE_INVENTORY_CACHE=True
answered Feb 19 by farookh
0 votes

Adding to @Farookh's answer, if the inventory plugin accepts a YAML configuration source, you can also enable the inventory cache in the configuration file, something like this:

# dev.aws_ec2.yaml
plugin: aws_ec2
cache: True
answered Feb 19 by Shalaka

Related Questions In Ansible

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 16, 2018 in Ansible by shubham
• 6,890 points
1,122 views
0 votes
1 answer

How to ignore failed commands in Ansible?

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

answered Feb 7 in Ansible by Patt
2,699 views
0 votes
1 answer
0 votes
1 answer

How do I execute a shell script and then use the result in ansible

This can work out for you: - name: ...READ MORE

answered Apr 11, 2018 in Ansible by shubham
• 6,890 points
1,648 views
+13 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
205 views
0 votes
1 answer
0 votes
1 answer

How do I enable cache plugin in Ansible?

Hey @Jason, You can enable a cache plugin ...READ MORE

answered Feb 19 in Ansible by Yogesh
91 views
0 votes
1 answer

How to configure fact caching in Ansible?

There are two cache plugins: redis and jsonfile. To ...READ MORE

answered Jan 24 in Ansible by Kennedy
401 views