Storing facts on remote hosts

35 views
Skip to first unread message

Volodymyr Linevych

unread,
Apr 28, 2016, 7:11:47 PM4/28/16
to Ansible Project
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:
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!

Matt Martz

unread,
Apr 28, 2016, 7:56:26 PM4/28/16
to ansible...@googlegroups.com
/etc/ansible/facts.d on the target nodes might be what you are looking for.

--
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/9967bb63-418e-4da8-a2d7-59250393a979%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Matt Martz
@sivel
sivel.net

Reply all
Reply to author
Forward
0 new messages