From 0f76623287dd1efb95189b54ac9dad94b32cbd41 Mon Sep 17 00:00:00 2001 From: Erik Berg Date: Tue, 26 Oct 2021 13:42:58 +0200 Subject: [PATCH] kustomize lookup plugin: build_flags Allow setting a string of optional build_flags at the end of the command. --- plugins/lookup/kustomize.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/lookup/kustomize.py b/plugins/lookup/kustomize.py index 2500fb245c..05083602da 100644 --- a/plugins/lookup/kustomize.py +++ b/plugins/lookup/kustomize.py @@ -30,6 +30,9 @@ opt_dirs: description: - An optional list of directories to search for the executable in addition to PATH. + build_flags: + description: + - Set additional build flags, like --enable-alpha-plugins requirements: - "python >= 3.6" @@ -136,6 +139,9 @@ def run( ) ) + if "build_flags" in kwargs: + command += [kwargs["build_flags"]] + (out, err) = run_command(command) if err: raise AnsibleLookupError(