I want to define a playbook which establishes facts about my hosts that can be used in other plays. The set_fact module claims to be able to do this ... http://docs.ansible.com/set_fact_module.html -- however it's not working ... The facts I define are available after the call to set_fact within a run of the play-book -- I would then expect to be able to use ansible all -m setup and see the fact defined somewhere within the facts gathered for each host ...
I tried looking into the code for the set_fact module -- but all I find is documentation string ... https://github.com/ansible/ansible-modules-core/blob/19b328c4df2157b6c0191e9144236643ce2be890/utilities/logic/set_fact.py
set_fact
should work persistent. I tried to find the actual code, only found a reference thatset_fact
is an action plugin but was unable find the action plugins now that everything is split up in 3 repos. I found this thread from the mailing list which mentions an undocumentedpersistent
parameter. Maybe play with that. – udondan