> Sorry for re-opening a old thread but I am still struggling on  related
> topic..
>
> Step 1: I am copying some .rb files to the
> /usr/lib/ruby/site_ruby/ruby/1.8/facter/ folder
> Step 2: A facter command gives me the values for all new custom / external
> facts
>
> But the values for new facts will not get into puppetdb untill a next agent
> run...
>
> Is there a way to run puppet from within a manifest or any other way to
> force "replace facts" remotely on the agent ???

* You could run things in noop mode potentially, which would force a
fact submission.
* You could run puppet apply, and use a masterless way of submitting
facts also (setup would be required:
http://docs.puppetlabs.com/puppetdb/2.0/connect_puppet_apply.html).
* You could submit a POST request in a script for your facts against
the master, throwing away the catalog (saves on the noop processing)
* You could sumibt the facts manually to PuppetDB yourself, here is a
rough script I use for testing which you could modify to match your
needs: https://gist.github.com/kbarber/6190c64335613111c9df

Each one has its own pros and cons. In particular some of these
require direct communication between the node and the PDB instance
which might not be desirable in some cases.

None of these things have common solutions today that we (the PDB
maintainers) "maintain" ourselves, but a few people have done things
like the above in the past in their own bespoke way.

ken.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAE4bNTkE4Ckp%3D-xANeSWZc2xfMwnzD2%3De4ptdcDaspLEaFNnCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to