Forge Home

jq

Install, manage and configure jq in puppet

2,884 downloads

1,125 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.2.0 (latest)
  • 1.1.0
  • 1.0.0
released May 14th 2021
This version is compatible with:
  • Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 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 < 8.0.0
  • , , , , , , , , ArchLinux

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'rehan-jq', '1.2.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add rehan-jq
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install rehan-jq --version 1.2.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: json, parser, jq

Documentation

rehan/jq — version 1.2.0 May 14th 2021

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.

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.