Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Expose facts from Facter as JSON over HTTP
Ruby Puppet
branch: master
Failed to load latest commit information.
bin refactor code to move most of the running out of the exec
lib whitespace cleanup
puppet/modules/web-facter update puppet module after actually testing it works
test add test to check filtering works
.gitignore convert prototype to gem
Gemfile try json_pure gem to see if build passes
README include reference to puppet module in README, and describe new filter…
Rakefile add test suite to check basic functionality


A tiny ruby rack application which exposes the data from facter as JSON over HTTP.

    gem install web-facter

Provides a simple command line tool which runs a built in web server. On accessing
the specified port you should get a JSON response containing the current facts.

    web-facter --help
    Usage: web-facter [options] ...

    Configuration options:
            --no-daemonize               Don't daemonize the web server process
        -p, --port PORT                  The port to run web-facter on
        -c, --config FILE                The file to load with configuration options
        -h, --help                       Display this screenp

You can configure web-facter using a configuration file, using the following format, and
specifying the filename with the --config option above.

    filters="ec2_public_keys_0_openssh_key, ec2_userdata, sshdsakey, sshrsakey"

Note that the port and daemonize options will override those on the command line. The username and password options enable HTTP basic authentication using details specified.

The filters option will remove sensitive items from the output, you can specify any keys you like and they'll be remove automatically.

If you're using puppet (highly likely if you're using facter) then the provided puppet module might be of use. Include in your puppet module diretory and modify as needed. You can use like so:

    import "web-facter"
    class { "webfacter": username => "username", password => "password" }

Something went wrong with that request. Please try again.