Project

rfacter

0.0
No commit activity in last 3 years
No release in over 3 years
RFacter is a library for collecting facts from remote system(s) by executing commands over transports such as SSH and WinRM.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 12.0
~> 3.1
~> 0.9

Runtime

~> 0.23.0
 Project Readme

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.