diff options
author | Sam Doran <sdoran@redhat.com> | 2018-08-13 12:54:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-13 12:54:31 -0400 |
commit | 6d38167d49eb41c67d0b58061b8555cf7255705f (patch) | |
tree | d0b4a0f299422723b615483d1fb2722841c0a1c8 /test/integration/targets/vars_prompt/vars_prompt-2.yml | |
parent | d5662df6959442c100c78ad2da996eef53278beb (diff) | |
download | ansible-6d38167d49eb41c67d0b58061b8555cf7255705f.tar.gz |
Only template values in vars_prompt rather than all vars (#39304)
* Only template values in vars_prompt rather than all vars
This allows the use of variables in vars_prompt fields but allows variables entered in the prompt to affect play vars rather than throwing an undefined error.
Only post validate if there was a vars_prompt
* Add tests for vars_prompt
Diffstat (limited to 'test/integration/targets/vars_prompt/vars_prompt-2.yml')
-rw-r--r-- | test/integration/targets/vars_prompt/vars_prompt-2.yml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/integration/targets/vars_prompt/vars_prompt-2.yml b/test/integration/targets/vars_prompt/vars_prompt-2.yml new file mode 100644 index 0000000000..d8f20db801 --- /dev/null +++ b/test/integration/targets/vars_prompt/vars_prompt-2.yml @@ -0,0 +1,16 @@ +- name: Test vars_prompt custom prompt + hosts: testhost + become: no + gather_facts: no + + vars_prompt: + - name: input + prompt: "Enter some input" + + tasks: + - assert: + that: + - input == 'some more input' + + - debug: + var: input |