diff options
author | Martin Krizek <martin.krizek@gmail.com> | 2020-07-30 21:57:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-30 15:57:01 -0400 |
commit | bf7276a4e88de6e102ad06aa1d0716ae799d87ea (patch) | |
tree | bf356df4a9e81d7a31c28cf826fb777a5f0234b6 /test/integration/targets/template | |
parent | d62dffafb3671dfc331eef6a847dde05b24a73d0 (diff) | |
download | ansible-bf7276a4e88de6e102ad06aa1d0716ae799d87ea.tar.gz |
Emit proper error for `x in y` when y is undefined (#70990)
Fixes #70984
Diffstat (limited to 'test/integration/targets/template')
-rw-r--r-- | test/integration/targets/template/tasks/main.yml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/integration/targets/template/tasks/main.yml b/test/integration/targets/template/tasks/main.yml index 10ea474d7c..da80343686 100644 --- a/test/integration/targets/template/tasks/main.yml +++ b/test/integration/targets/template/tasks/main.yml @@ -706,5 +706,14 @@ - 'diff_result.stdout == ""' - "diff_result.rc == 0" +- debug: + msg: "{{ 'x' in y }}" + ignore_errors: yes + register: error + +- name: check that proper error message is emitted when in operator is used + assert: + that: "\"'y' is undefined\" in error.msg" + # aliases file requires root for template tests so this should be safe - include: backup_test.yml |