- Description
- Setup - The basics of getting started with jq
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Dependencies - Other modules used by this module.
- Development - Guide for contributing to the module
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.
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.
This module is designed to be as clean and compliant with latest puppet code guidelines.
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',
}
- package_source: Allows control over where the
jq
package is sourced from. The two possible values aregithub
andos
. The default isgithub
. - package_manage: Controls the wget package management by this module. The default is
true
. If it isfalse
, 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 thepackage_source
is set togithub
. - download_url: Download URL for
jq
. The default is github releases page ofjq
. This value only gets used if thepackage_source
is set togithub
. - download_dir: Location where the
jq
binaries are being downloaded. Defaults to/opt/jq
. This value only gets used if thepackage_source
is set togithub
. - 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 thepackage_source
is set togithub
.
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'
Currently, this module only supports Linux based systems.
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.