kubernetes.core.helm_repository module – Manage Helm repositories.

Note

This module is part of the kubernetes.core collection (version 2.3.2).

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 kubernetes.core. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: kubernetes.core.helm_repository.

New in kubernetes.core 0.11.0

Synopsis

  • Manage Helm repositories.

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 kubernetes.core 2.3.0

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 kubernetes.core 2.3.0

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.

host

string

added in kubernetes.core 2.3.0

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

pass_credentials

boolean

added in kubernetes.core 2.3.0

Pass credentials to all domains.

Choices:

  • false ← (default)

  • true

repo_name

aliases: name

string / required

Chart repository name.

repo_password

aliases: password

string

Chart repository password for repository with basic auth.

Required if chart_repo_username is specified.

repo_state

aliases: state

string

Desired state of repository.

Choices:

  • "present" ← (default)

  • "absent"

repo_url

aliases: url

string

Chart repository url

repo_username

aliases: username

string

Chart repository username for repository with basic auth.

Required if chart_repo_password is specified.

validate_certs

aliases: verify_ssl

boolean

added in kubernetes.core 2.3.0

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

Choices:

  • false

  • true ← (default)

Examples

- name: Add a repository
  kubernetes.core.helm_repository:
    name: stable
    repo_url: https://kubernetes.github.io/ingress-nginx

- name: Add Red Hat Helm charts repository
  kubernetes.core.helm_repository:
    name: redhat-charts
    repo_url: https://redhat-developer.github.com/redhat-helm-charts

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: "/usr/local/bin/helm repo add bitnami https://charts.bitnami.com/bitnami"

msg

string

Error message returned by `helm` command

Returned: on failure

Sample: "Repository already have a repository named bitnami"

stderr

string

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

Returned: always

Sample: ""

stderr_lines

list / elements=string

Full `helm` command stderr in list, 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: "\"bitnami\" has been added to your repositories"

stdout_lines

list / elements=string

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

Returned: always

Sample: ["\"bitnami\" has been added to your repositories"]

Authors

  • Lucas Boisserie (@LucasBoisserie)