mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-14 21:42:21 +00:00
Helm normalizes repository URLs internally, so a URL supplied with a
trailing slash and the same URL without one are treated as different
entries. This causes the module to fail every run when the user
provides a trailing slash, even though the repository is already
correctly registered.
Strip the trailing slash from repo_url before comparing against the
existing repository list so repeated runs with the same input are
idempotent.
Fixes #480
(cherry picked from commit 8a58d3b6de)
Co-authored-by: Yuriy Novostavskiy <yuriy@novostavskiy.kiev.ua>
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
bugfixes:
|
||||||
|
- helm_repository - correct handling of repository URLs with trailing slashes (https://github.com/ansible-collections/kubernetes.core/pull/1121).
|
||||||
@@ -302,6 +302,8 @@ def main():
|
|||||||
|
|
||||||
repo_name = module.params.get("repo_name")
|
repo_name = module.params.get("repo_name")
|
||||||
repo_url = module.params.get("repo_url")
|
repo_url = module.params.get("repo_url")
|
||||||
|
if repo_url:
|
||||||
|
repo_url = repo_url.rstrip("/")
|
||||||
repo_username = module.params.get("repo_username")
|
repo_username = module.params.get("repo_username")
|
||||||
repo_password = module.params.get("repo_password")
|
repo_password = module.params.get("repo_password")
|
||||||
repo_state = module.params.get("repo_state")
|
repo_state = module.params.get("repo_state")
|
||||||
|
|||||||
Reference in New Issue
Block a user