Project

openfact

0.01
No release in over 3 years
You can prove anything with facts!
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

>= 1.15.5, < 1.17.0, != 1.16.0, != 1.16.1, != 1.16.2
~> 13.0, >= 13.0.6
~> 3.0
~> 1.28
~> 0.17.1
~> 3.12
~> 0.9

Runtime

~> 1.3
>= 1.0.1, < 1.3
 Project Readme

openfact

Gem Version

OpenFact is a community implementation of Facter, a command-line tool that gathers basic facts about nodes (systems) such as hardware details, network settings, OS type and version, and more. These facts are made available as variables in your Puppet manifests and can be used to inform conditional expressions in Puppet.

Documentation

Documentation for the Facter project can be found on the Puppet Docs site.

At the time of writing, the OpenVoxProject does not have a documentation website. But your help is very welcome! Reach out to the Documentation Special Interest Group if you want to help.

Supported platforms

  • Linux
  • macOS
  • Windows
  • Solaris
  • AIX

Requirements

  • Ruby 2.5+
  • FFI (for facts like mountpoints which are resolved using C API calls)

Basic concepts

The project has three main parts, the framework, facts and resolvers. In the framework we implement functionality that is agnostic of specific facts like parsing user input, formatting output, etc.

Facts are the nuggets of information that will be provided by openfact e.g. os.name, networking.interfaces, etc.

Resolvers have the role of gathering data from the system. For example a resolver can execute a command on the system, can read a file or any operation that retrieves some data from a single source on the system.

sequenceDiagram
    participant user
    participant framework
    participant fact
    participant resolver
    user->>framework: user query
    framework->>fact: create
    fact->>resolver: resolve
    resolver->>fact: system information
    fact->>framework: fact value
    framework->>user: formatted user output
Loading

Getting started

After cloning the project, run bundle install to install all dependencies.

You can run openfact by executing ./bin/facter. The command will output all the facts that openfact detected for the current OS.

The implementation can be validated locally by running bundle exec rake check.

Licensing

See LICENSE file. OpenFact is licensed by the OpenVox Project as a community maintained implementation of Facter. The OpenVox Project can be contacted at: openvox@voxpupuli.org. Puppet itself is licensed by Puppet, Inc. under the Apache license. Puppet, Inc. can be contacted at: info@puppet.com.