kubernetes.core.helm_registry_auth module – Helm registry authentication module

Note

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

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_registry_auth.

New in kubernetes.core 5.1.0

Synopsis

  • Helm registry authentication module allows you to login helm registry login and logout helm registry logout from a Helm registry.

Requirements

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

Parameters

Parameter

Comments

binary_path

path

The path of a helm binary to use.

ca_file

path

Path to the CA certificate SSL file for verify registry server certificate.

cert_file

path

Path to the client certificate SSL file for identify registry client using this certificate file.

host

aliases: registry_url

string / required

Provide a URL for accessing the registry.

insecure

boolean

Allow connections to SSL sites without certs.

Choices:

  • false ← (default)

  • true

key_file

path

Path to the client key SSL file for identify registry client using this key file.

password

aliases: repo_password

string

Password for the registry.

state

string

Desired state of the registry.

If set to present attempt to log in to the remote registry server using the URL specified in host.

If set to absent attempt to log out from the remote registry server using the URL specified in host.

Choices:

  • "present" ← (default)

  • "absent"

username

aliases: repo_username

string

Username for the registry.

Examples

- name: Login to remote registry
  kubernetes.core.helm_registry_auth:
    username: admin
    password: "sample_password"
    host: localhost:5000

- name: Logout from remote registry
  kubernetes.core.helm_registry_auth:
    state: absent
    host: localhost:5000

Return Values

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

Key

Description

command

string

Full helm command executed

Returned: always

Sample: "/usr/local/bin/helm registry login oci-registry.domain.example --username=admin --password-stdin --insecure"

failed

boolean

Indicate if the helm command failed

Returned: always

Sample: false

stderr

string

Full helm command stderr, in case you want to display it or examine the event log. Please be note that helm binnary may print messages to stderr even if the command is successful.

Returned: always

Sample: "Login Succeeded\\n"

stderr_lines

list / elements=string

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

Returned: always

stdout

string

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

Returned: always

stout_lines

list / elements=string

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

Returned: always

Authors

  • Yuriy Novostavskiy (@yurnov)