fact_caching override in playbook?

24 views
Skip to first unread message

nds.ap...@gmail.com

unread,
Sep 3, 2020, 5:40:27 PM9/3/20
to Ansible Project
Hi Team,

I have a project which uses ansible to run traffic tools on a given set of hosts.
I have fact_caching enabled.

While configuring and starting the traffic there are at times where the facts in the system changes dynamically for which i need to freshly gather facts but due to fact_caching mechanism i get the cached output.

Can we override fact_caching in the playbook dynamically based on requirements?

Regards
Sai

Kuldip Madnani

unread,
Sep 3, 2020, 7:08:15 PM9/3/20
to Ansible Project
You can run this as a pre step to clear the cache:
rm ${fact_caching_connection}/*

where fact_caching_connection can be configured in your ansible.cfg

Nuno Jordão

unread,
Sep 5, 2020, 12:11:01 AM9/5/20
to ansible...@googlegroups.com
Maybe the clear_facts meta module and a new fact gathering may work in your case?

--
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/61e57227-1fd8-41ec-9fd1-cb1c33ee73b3n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages