new module helm_registry_auth

This commit is contained in:
Yuriy Novostavskiy
2024-11-19 23:03:13 +00:00
parent 513ff66fcf
commit 0a3f7c769d
5 changed files with 610 additions and 8 deletions

View File

@@ -159,11 +159,11 @@ class AnsibleHelmModule(object):
self.helm_env = self._prepare_helm_environment()
return self.helm_env
def run_helm_command(self, command, fails_on_error=True):
def run_helm_command(self, command, fails_on_error=True, data=None):
if not HAS_YAML:
self.fail_json(msg=missing_required_lib("PyYAML"), exception=YAML_IMP_ERR)
rc, out, err = self.run_command(command, environ_update=self.env_update)
rc, out, err = self.run_command(command, environ_update=self.env_update, data=data)
if fails_on_error and rc != 0:
self.fail_json(
msg="Failure when executing Helm command. Exited {0}.\nstdout: {1}\nstderr: {2}".format(