summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatt Davis <6775756+nitzmahone@users.noreply.github.com>2023-02-15 11:34:54 -0800
committerGitHub <noreply@github.com>2023-02-15 13:34:54 -0600
commitd5fd83265d3a050b02cdb9293708ae4deed8cbde (patch)
tree4032f2a7b3c8fd040083c4c419c5eda7fcdd66b3 /lib
parent344230fca5bc982ac1a46da7445c2812b0b92b1f (diff)
downloadansible-d5fd83265d3a050b02cdb9293708ae4deed8cbde.tar.gz
[2.13] don't ignore templated _raw_params that k=v parser failed to parse (#79913) (#79965)
* don't ignore templated _raw_params that k=v parser failed to parse (#79913) fixes #79862 * backport test changes
Diffstat (limited to 'lib')
-rw-r--r--lib/ansible/executor/task_executor.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py
index baeb1d1bea..4fad7e7ce2 100644
--- a/lib/ansible/executor/task_executor.py
+++ b/lib/ansible/executor/task_executor.py
@@ -534,6 +534,10 @@ class TaskExecutor:
"(see https://docs.ansible.com/ansible/devel/reference_appendices/faq.html#argsplat-unsafe)")
variable_params.update(self._task.args)
self._task.args = variable_params
+ else:
+ # if we didn't get a dict, it means there's garbage remaining after k=v parsing, just give up
+ # see https://github.com/ansible/ansible/issues/79862
+ raise AnsibleError(f"invalid or malformed argument: '{variable_params}'")
# update no_log to task value, now that we have it templated
no_log = self._task.no_log