universal_inventory

pdk
Collects installed application data across all modern OSs and provides it as a fact, in a blob of JSON for onward processing

Ian Gibbs

realflash

5,562 downloads

4,104 latest version

5.0 quality score

Version information

  • 0.0.9 (latest)
  • 0.0.8
  • 0.0.7
  • 0.0.6
  • 0.0.5
  • 0.0.4
  • 0.0.3
  • 0.0.2
  • 0.0.1
released Sep 4th 2018
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.7.0 < 6.0.0
  • CentOS
    ,
    OracleLinux
    ,
    RedHat
    ,
    Scientific
    ,
    Debian
    ,
    Ubuntu
    ,
    LinuxMint
    ,
    windows
    ,
    Darwin
    ,
    SLES
    ,
    Fedora
    ,
    Amazon

Start using this module

Documentation

realflash/universal_inventory — version 0.0.9 Sep 4th 2018

Universal Inventory

Table of Contents

  1. Description
  2. Setup - The basics of getting started with universal_inventory
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.
  5. Development - Guide for contributing to the module
  6. Unintentional Contributors

Description

This module queries the local package database for a list of installed package names and versions, and returns the data as a piece of JSON (with the ultimte intention that you can then query that fact centrally and do something with it). Whilst there are plenty of modules in Puppet Forge that are dedicated to inventoring specific OSs, this is the only one (to my knowledge) that queries all the major OSs whatever they are.

OS Support

I've listed the modern current versions of the OS that I have test this module on, but the technologoies used to query the local package database are old so you will almost certainly get it to work on older and newer versions of these OSs. Please submit success and failure reports as GutHub issues so that I can extend the list.

Here's the method of querying packages for each OS:

  • APT-based Linux distributions: dpkg-query
  • RPM-based Linux distributions: rpm
  • Windows: wmic
  • OS X: system_profiler

So if that command exists on your OS, it will probabably work. HOWEVER: the module is designed to choose its query method based on the puppet fact operatingsystem. If your operatingsystem string doesn't match one of the ones recognised by the module, it will error out. To get your OS added, open an issue on GitHub.

Setup

What universal_inventory affects OPTIONAL

Adds a fact called 'inventory'. No changes are made to the target node.

Setup Requirements OPTIONAL

None.

Usage

Just install and the fact will become available.

Development

Contributions welcome at GitHub.

Unintentional Contributors

Thank you to those whose code I borrowed: