Ansible role to install JC (JSON Convert) on Debian and Ubuntu using apt, pipx or git.
This role can be run using become
or as root
to install jc
server-wide or as regular user for git
installs, usig pipx
into ~/.local/bin
, you might need to update your $PATH
environmental variable if ~/.local/bin
is not includedn in it already.
This role can be used via the localhost repo to install jc
locally.
Set jc
to true
for the tasks in this role to be run, see default variables for all the variables.
The following documentation has been generated from the meta/argument_specs.yml.
The main entry point for the JC role.
Option | Description | Type | Required |
---|---|---|---|
jc | Run the tasks in this role. | bool | yes |
jc_bash | Install Bash completion if the jc version is >= 1.20.1 and not the .deb package, unless the jc version is <= 1.20.1. | bool | yes |
jc_home | Generated variable for the HOME directory of the Ansible user that JC is to be present for. | str | yes |
jc_install | Install method for JC. | str | yes |
jc_jmespath_queries | JMESPath queries. | dict | yes |
jc_pipx_root_env | The pipx environment variables for the root user. | dict of 'jc_pipx_root_env' options | no |
jc_pipx_user_env | The pipx environment variables for a regular user. | dict of 'jc_pipx_user_env' options | no |
jc_verify | Verify variables that start with jc underscore using the argument specification. | bool | yes |
jc_version | JC version number, branch name or latest. | str | yes |
Option | Description | Type | Required |
---|---|---|---|
PIPX_HOME | The PIPX_HOME environment variable value for pipx when run as root. | str | no |
PIPX_BIN_DIR | The PIPX_BIN_DIR environment variable value for pipx when run as root. | str | no |
Option | Description | Type | Required |
---|---|---|---|
PIPX_HOME | The PIPX_HOME environment variable value for pipx when run as a regular user. | str | no |
PIPX_BIN_DIR | The PIPX_BIN_DIR environment variable value for pipx when run as a regular user. | str | no |
Choice |
---|
deb |
git |
pipx |
The primary URL of this repo is https://git.coop/webarch/jc
however it is also mirrored to GitHub and available via Ansible Galaxy.
If you use this role please use a tagged release, see the release notes.
Copyright 2022-2024 Chris Croome, <chris@webarchitects.co.uk>.
This role is released under the same terms as Ansible itself, the GNU GPLv3.