.. _kubernetes.core.helm_registry_auth_module: ********************************** kubernetes.core.helm_registry_auth ********************************** **Helm registry authentication module** Version added: 5.1.0 .. contents:: :local: :depth: 1 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. - helm (https://github.com/helm/helm/releases) >= 3.8.0, <4.0.0 Parameters ---------- .. raw:: html
Parameter Choices/Defaults 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
string / required
Provide a URL for accessing the registry.

aliases: registry_url
insecure
boolean
    Choices:
  • no ←
  • yes
Allow connections to SSL sites without certs.
key_file
path
Path to the client key SSL file for identify registry client using this key file.
password
string
Password for the registry.

aliases: repo_password
state
string
    Choices:
  • present ←
  • absent
Desired state of the registry.
If set to V(present) attempt to log in to the remote registry server using the URL specified in O(host).
If set to V(absent) attempt to log out from the remote registry server using the URL specified in O(host).
As helm >= 3.18.0 reports successful logout even if the user is not logged in, this module will report a change regardless of the current state.
username
string
Username for the registry.

aliases: repo_username

Examples -------- .. code-block:: yaml - 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: .. raw:: html
Key Returned Description
command
string
always
Full helm command executed

Sample:
/usr/local/bin/helm registry login oci-registry.domain.example --username=admin --password-stdin --insecure
failed
boolean
always
Indicate if the helm command failed

stderr
string
always
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.

Sample:
Login Succeeded\n
stderr_lines
list
always
Full helm command stderr, in case you want to display it or examine the event log

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

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



Status ------ Authors ~~~~~~~ - Yuriy Novostavskiy (@yurnov)