diff options
author | Matt Davis <6775756+nitzmahone@users.noreply.github.com> | 2023-02-15 11:34:54 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-15 13:34:54 -0600 |
commit | d5fd83265d3a050b02cdb9293708ae4deed8cbde (patch) | |
tree | 4032f2a7b3c8fd040083c4c419c5eda7fcdd66b3 /lib | |
parent | 344230fca5bc982ac1a46da7445c2812b0b92b1f (diff) | |
download | ansible-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.py | 4 |
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 |