From 5a5ed79b897dfde1886c9bfd8a987c6af5b8e8bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Thu, 14 Jan 2021 11:19:12 -0500 Subject: [PATCH] Revert "helm - remove trailing whitespaces (#337) (#345)" (#346) This reverts commit 003d8020653efcea99bfaa74f350fe1fab5ab84a. See: https://github.com/ansible-collections/community.kubernetes/pull/345#issuecomment-760291333 --- plugins/modules/helm_repository.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/plugins/modules/helm_repository.py b/plugins/modules/helm_repository.py index 0e2235e0..bb0eccc3 100644 --- a/plugins/modules/helm_repository.py +++ b/plugins/modules/helm_repository.py @@ -124,12 +124,6 @@ from ansible.module_utils.basic import AnsibleModule, missing_required_lib from ansible_collections.community.kubernetes.plugins.module_utils.helm import run_helm -# Remove trailing whitespaces -def remove_trailing_spaces(parameter): - if parameter is not None: - return parameter.strip(" ") - - # Get repository from all repositories added def get_repository(state, repo_name): if state is not None: @@ -201,12 +195,12 @@ def main(): changed = False - bin_path = remove_trailing_spaces(module.params.get('binary_path')) - repo_name = remove_trailing_spaces(module.params.get('repo_name')) - repo_url = remove_trailing_spaces(module.params.get('repo_url')) - repo_username = remove_trailing_spaces(module.params.get('repo_username')) - repo_password = remove_trailing_spaces(module.params.get('repo_password')) - repo_state = remove_trailing_spaces(module.params.get('repo_state')) + bin_path = module.params.get('binary_path') + repo_name = module.params.get('repo_name') + repo_url = module.params.get('repo_url') + repo_username = module.params.get('repo_username') + repo_password = module.params.get('repo_password') + repo_state = module.params.get('repo_state') if bin_path is not None: helm_cmd = bin_path