From c59db1990bb25dca0760398a322a0e6cacaab76d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20H=C3=BCgli?= Date: Thu, 4 Feb 2021 20:08:10 +0100 Subject: [PATCH] fix has_plugin detection method --- plugins/modules/helm.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugins/modules/helm.py b/plugins/modules/helm.py index 993def91..1da12713 100644 --- a/plugins/modules/helm.py +++ b/plugins/modules/helm.py @@ -407,10 +407,7 @@ def has_plugin(command, plugin): cmd = command + " plugin list" rc, out, err = run_helm(module, cmd) for line in out.splitlines(): - if line.startswith("NAME"): - continue - name, _rest = line.split("\t", 1) - if name == plugin: + if line.lstrip().startswith(plugin): return True return False