community.kubernetes.helm_plugin – Manage Helm plugins

Note

This plugin is part of the community.kubernetes collection (version 1.2.1).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install community.kubernetes.

To use it in a playbook, specify: community.kubernetes.helm_plugin.

New in version 1.0.0: of community.kubernetes

Synopsis

  • Manages Helm plugins.

Note

This module has a corresponding action plugin.

Requirements

The below requirements are needed on the host that executes this module.

Parameters

Parameter

Comments

api_key

string

added in 1.2.0 of community.kubernetes

Token used to authenticate with the API. Can also be specified via K8S_AUTH_API_KEY environment variable.

binary_path

path

The path of a helm binary to use.

ca_cert

aliases: ssl_ca_cert

path

added in 1.2.0 of community.kubernetes

Path to a CA certificate used to authenticate with the API. The full certificate chain must be provided to avoid certificate validation errors. Can also be specified via K8S_AUTH_SSL_CA_CERT environment variable.

context

aliases: kube_context

string

Helm option to specify which kubeconfig context to use.

If the value is not specified in the task, the value of environment variable K8S_AUTH_CONTEXT will be used instead.

host

string

added in 1.2.0 of community.kubernetes

Provide a URL for accessing the API. Can also be specified via K8S_AUTH_HOST environment variable.

kubeconfig

aliases: kubeconfig_path

path

Helm option to specify kubeconfig path to use.

If the value is not specified in the task, the value of environment variable K8S_AUTH_KUBECONFIG will be used instead.

plugin_name

string

Name of Helm plugin.

Required only if state=absent.

plugin_path

string

Plugin path to a plugin on your local file system or a url of a remote VCS repo.

If plugin path from file system is provided, make sure that tar is present on remote machine and not on Ansible controller.

Required only if state=present.

release_namespace

aliases: namespace

string

Kubernetes namespace where the helm plugin should be installed.

state

string

If state=present the Helm plugin will be installed.

If state=absent the Helm plugin will be removed.

Choices:

  • absent

  • present ← (default)

validate_certs

aliases: verify_ssl

boolean

added in 1.2.0 of community.kubernetes

Whether or not to verify the API server’s SSL certificates. Can also be specified via K8S_AUTH_VERIFY_SSL environment variable.

Choices:

  • no

  • yes ← (default)

Examples

- name: Install Helm env plugin
  community.kubernetes.helm_plugin:
    plugin_path: https://github.com/adamreese/helm-env
    state: present

- name: Install Helm plugin from local filesystem
  community.kubernetes.helm_plugin:
    plugin_path: https://domain/path/to/plugin.tar.gz
    state: present

- name: Remove Helm env plugin
  community.kubernetes.helm_plugin:
    plugin_name: env
    state: absent

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

command

string

Full helm command built by this module, in case you want to re-run the command outside the module or debug a problem.

Returned: always

Sample: “helm plugin list …”

msg

string

Info about successful command

Returned: always

Sample: “Plugin installed successfully”

rc

integer

Helm plugin command return code

Returned: always

Sample: 1

stderr

string

Full helm command stderr, in case you want to display it or examine the event log

Returned: always

Sample: “”

stdout

string

Full helm command stdout, in case you want to display it or examine the event log

Returned: always

Sample: “”

Authors

  • Abhijeet Kasurde (@Akasurde)