From 65641ba2caa5efe831513e277943a9f6766951de Mon Sep 17 00:00:00 2001 From: Yuriy Novostavskiy Date: Fri, 29 Nov 2024 15:24:15 +0000 Subject: [PATCH] remove unused imports and fix other linters errors --- docs/kubernetes.core.helm_registry_auth_module.rst | 1 + plugins/modules/helm_registry_auth.py | 13 +++++-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/docs/kubernetes.core.helm_registry_auth_module.rst b/docs/kubernetes.core.helm_registry_auth_module.rst index cd4cbd05..a6114830 100644 --- a/docs/kubernetes.core.helm_registry_auth_module.rst +++ b/docs/kubernetes.core.helm_registry_auth_module.rst @@ -235,6 +235,7 @@ Common return values are documented `here always +
Indicate if the state of the registry was changed

diff --git a/plugins/modules/helm_registry_auth.py b/plugins/modules/helm_registry_auth.py index fcaf7424..217ffc06 100644 --- a/plugins/modules/helm_registry_auth.py +++ b/plugins/modules/helm_registry_auth.py @@ -105,7 +105,9 @@ stout_lines: returned: always stderr: type: str - description: 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. + description: >- + 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: @@ -128,17 +130,12 @@ changed: returned: always """ -import copy -import traceback - -from ansible.module_utils.basic import missing_required_lib -from ansible.module_utils.common.process import get_bin_path from ansible_collections.kubernetes.core.plugins.module_utils.helm import ( AnsibleHelmModule, ) -def argument_spec(): +def arg_spec(): arg_spec.update( dict( host=dict(type="str", aliases=["registry_url"], required=True), @@ -196,7 +193,7 @@ def main(): global module module = AnsibleHelmModule( - argument_spec=argument_spec(), + argument_spec=arg_spec(), required_together=[["username", "password"]], mutually_exclusive=None, supports_check_mode=True,