jq

pdk
Install, manage and configure jq in puppet
Rehan Mahmood

Rehan Mahmood

rehan

1,126 downloads

885 latest version

5.0 quality score

Version information

  • 1.1.0 (latest)
  • 1.0.0
released Jul 23rd 2020
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x
  • Puppet >= 5.5.10 < 7.0.0
  • RedHat
    ,
    CentOS
    ,
    OracleLinux
    ,
    Scientific
    ,
    Fedora
    ,
    SLES
    ,
    Debian
    ,
    Ubuntu
    , ArchLinux

Start using this module

Tags: jq, json, parser

Documentation

rehan/jq — version 1.1.0 Jul 23rd 2020

jq

Puppet Forge Build Status

Table of Contents

  1. Description
  2. Setup - The basics of getting started with jq
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.
  5. Dependencies - Other modules used by this module.
  6. Development - Guide for contributing to the module

Description

jq is a lightweight and flexible command-line JSON processor. This module can manage installation and configuration of jq. It downloads the jq binaries from the github releases.

Setup

Basics

In order to install rehan-jq, run the following command:

$ puppet module install rehan-jq

The module can be used with hiera to provide all configuration options. See Usage for examples on how to configure it.

Setup Requirements

This module is designed to be as clean and compliant with latest puppet code guidelines. It works with:

  • puppet >=5.5.10

Usage

Classes

jq

A basic install with the defaults would be:

include jq

Otherwise using the parameters:

  class{ 'jq':
    package_source   => 'os',
    package_manage   => true,
    package_ensure   => present,
    package_name     => 'jq',
    download_version => '1.6',
    download_url     => 'https://github.com/stedolan/jq/releases/download',
    download_dir     => '/opt/jq',
    install_dir      => '/usr/local/bin',
  }
Parameters
  • package_source: Allows control over where the jq package is sourced from. The two possible values are github and os. The default is github.
  • package_manage: Controls the wget package management by this module. The default is true. If it is false, this module will not manage jq.
  • package_ensure: Sets the ensure parameter passed to the package. The default is present.
  • package_name: Provides the package name to be installed. The default is jq. It can be used on systems where the default name is other than that.
  • download_version: The version of jq to install. The default is the latest version available. This value only gets used if the package_source is set to github.
  • download_url: Download URL for jq. The default is github releases page of jq. This value only gets used if the package_source is set to github.
  • download_dir: Location where the jq binaries are being downloaded. Defaults to /opt/jq. This value only gets used if the package_source is set to github.
  • install_dir: Location where the jq binaries are linked to that makes them available to system path. Defaults to /usr/local/bin. This value only gets used if the package_source is set to github.

All of this data can be provided through Hiera.

YAML

jq::package_source: 'github'
jq::package_manage: true
jq::package_ensure: present
jq::package_name: 'jq'
jq::download_version: '1.6'
jq::download_url: 'https://github.com/stedolan/jq/releases/download'
jq::download_dir: '/opt/jq'
jq::install_dir: '/usr/local/bin'

Limitations

Currently, this module only supports Linux based systems.

Dependencies

Development

You can submit pull requests and create issues through the official page of this module on GitHub.

For more details about the development workflow and on how to contribute, please check the CONTRIBUTING.md.

Please do report any bug and suggest new features/improvements.