Hello, Ansible users! I am trying to make a group of variables persistent on hosts, preferably as a text file. I was using puppet+facter before and now I'm looking for a native way to accomplish this with ansible.
My task: 1. Facts are being initialised only once, when host is provisioned 2. Facts are stored as a text file on remote host and are reusable from any other scripts on that host 3. Facts are automatically read into ansible vars from file once ansible connects to a host At this moment I've tried following: - 'include_vars <http://docs.ansible.com/ansible/include_vars_module.html>' works only with local file - 'set_fact <http://docs.ansible.com/ansible/set_fact_module.html>' facts are not persistent - fact caching <http://docs.ansible.com/ansible/playbooks_variables.html#fact-caching>saves facts on local machine - 'facter <http://docs.ansible.com/ansible/facter_module.html>' module cannot store facts on host, it can only retrieve existing It looks like that my task can be accomplished with a custom inventory script, but before I spend a week on this, I'm asking here. Thanks! -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9967bb63-418e-4da8-a2d7-59250393a979%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
