Skip to content

Reduced, Remote-enabled, re-factoring of Facter 2.x

License

Notifications You must be signed in to change notification settings

Sharpie/rfacter

Repository files navigation

RFacter

Build Status

RFacter is a (highly) experimental fork of Facter 2.x that executes facts defined in Ruby against remote systems over transports such as SSH and WinRM.

Running RFacter

Run the rfacter binary on the command and pass it a list of nodes to inspect:

rfacter -n localhost -n some.remote.host \
  -n winrm://Administrator:password@some.windows.box

Special characters in passwords should be percent-encoded. I.e. V@grant! would become V%40grant%21.

See examples/fact_lookup.rb for an example of using RFacter as a library.

Adding your own facts

Currently, custom facts can only be added by setting the RFACTERLIB environment variable to a directories containing Ruby files:

export RFACTERLIB=${HOME}/some_facts:/var/lib/rfacter/my_facts

The directories should contain Ruby files with names matching the fact being defined. For example, the RFacter loader will expect my_fact to be defined in a file named my_fact.rb somewhere on the RFACTERLIB path. Custom facts can make use of the Facter 3 Ruby DSL:

https://github.com/puppetlabs/facter/blob/master/Extensibility.md#custom-facts-compatibility

Additional methods of configuring the loader will be added in a future release.

About

Reduced, Remote-enabled, re-factoring of Facter 2.x

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages