jsonfile fact caching error: error, fact_caching_connection is not set, cannot use fact cache

205 views
Skip to first unread message

senorsmile

unread,
Jul 29, 2015, 3:27:46 PM7/29/15
to Ansible Project
I have added the following to ansible.cfg

fact_caching = jsonfile
fact_caching_location
= /tmp/ansible_facts
fact_caching_timeout
= 86400

With these set, any attempts to use ansible or ansible-playbook (tried multiple different known working playbooks) fails with the error:

error, fact_caching_connection is not set, cannot use fact cache

I have tried this on both a mac and a linux machine. 

What is wrong there?

senorsmile

unread,
Jul 29, 2015, 3:28:12 PM7/29/15
to Ansible Project, senor...@gmail.com
I should add that both machines are using ansible 1.9.2. 

Brian Coca

unread,
Jul 29, 2015, 3:38:00 PM7/29/15
to Ansible Project, senor...@gmail.com
have you tried setting fact_caching_connection?
> --
> 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 post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/2a5b8fe9-061f-4c52-bfe5-01fe6f784208%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
Brian Coca

senorsmile

unread,
Jul 29, 2015, 3:40:43 PM7/29/15
to Ansible Project, bc...@ansible.com
There is no such keyword according to the docs:
http://docs.ansible.com/ansible/playbooks_variables.html#fact-caching

I can't even tell what it would want to be set to. 
jsonfile?
/tmp/ansible_facts?
something else?

Brian Coca

unread,
Jul 29, 2015, 3:42:04 PM7/29/15
to senorsmile, Ansible Project
docs are wrong, location doesn't exist, i'll fix the docs
--
Brian Coca

senorsmile

unread,
Jul 29, 2015, 3:49:13 PM7/29/15
to Ansible Project, bc...@ansible.com
Great.  So,

fact_caching_location


should actually be

fact_caching_connection

This should be dumping some sort of json of cached facts into that directory, correct?  When I run anything that gathers facts, the /tmp/ansible_facts/ dir is created.  However, it contains no files and no actual caching is happening. 
Reply all
Reply to author
Forward
0 new messages