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
61 views

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,480 points
586 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
386 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,480 points
221 views
+13 votes
2 answers
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
52 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
64 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.