summaryrefslogtreecommitdiff
path: root/test
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 /test
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 'test')
-rw-r--r--test/integration/targets/tasks/playbook.yml19
-rwxr-xr-xtest/integration/targets/tasks/runme.sh4
-rw-r--r--test/integration/targets/tasks/tasks/main.yml4
3 files changed, 23 insertions, 4 deletions
diff --git a/test/integration/targets/tasks/playbook.yml b/test/integration/targets/tasks/playbook.yml
new file mode 100644
index 0000000000..80d9f8b1e8
--- /dev/null
+++ b/test/integration/targets/tasks/playbook.yml
@@ -0,0 +1,19 @@
+- hosts: localhost
+ gather_facts: false
+ tasks:
+ # make sure tasks with an undefined variable in the name are gracefully handled
+ - name: "Task name with undefined variable: {{ not_defined }}"
+ debug:
+ msg: Hello
+
+ - name: ensure malformed raw_params on arbitrary actions are not ignored
+ debug:
+ garbage {{"with a template"}}
+ ignore_errors: true
+ register: bad_templated_raw_param
+
+ - assert:
+ that:
+ - bad_templated_raw_param is failed
+ - |
+ "invalid or malformed argument: 'garbage with a template'" in bad_templated_raw_param.msg
diff --git a/test/integration/targets/tasks/runme.sh b/test/integration/targets/tasks/runme.sh
new file mode 100755
index 0000000000..2d78eafc07
--- /dev/null
+++ b/test/integration/targets/tasks/runme.sh
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+
+ansible-playbook playbook.yml "$@"
+
diff --git a/test/integration/targets/tasks/tasks/main.yml b/test/integration/targets/tasks/tasks/main.yml
deleted file mode 100644
index f6ac1114d0..0000000000
--- a/test/integration/targets/tasks/tasks/main.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-# make sure tasks with an undefined variable in the name are gracefully handled
-- name: "Task name with undefined variable: {{ not_defined }}"
- debug:
- msg: Hello