I know that Facter is not intended to do this, but I would be glad to know how to write a custom fact to copy files from Puppet clients to main Puppet server. Thank you.
|
feedback
|
|
Copying files as a fact? Why would you want to do that? You can simply have an If you need to check the contents of a file for a fact, take this as an example:
You can then use regex functions to extract information from inside it. Note that this is sent as part of the URL of a GET request, which is usually limited in number of characters. I have If you really, truly need to copy the file, you can do something like this:
It will send the file by | |||
|
feedback
|
|
I think a better way would be to use auditing with a remote filebucket (I believe you need 2.6.5+ for this). Something like:
This causes /etc/group to be uploaded to the server when (a) it changes or (b) it hasn't been seen before. Then, on the server you can use the 'puppet filebucket' utility to check out the data the clients sent. This is way better than putting it in a fact. | |||
|
feedback
|