2018-05-21 16:04:43 +02:00
|
|
|
- name: Test pause module echo output
|
2019-01-26 04:37:56 +01:00
|
|
|
hosts: localhost
|
2018-05-21 16:04:43 +02:00
|
|
|
become: no
|
|
|
|
gather_facts: no
|
|
|
|
|
|
|
|
tasks:
|
|
|
|
- pause:
|
|
|
|
echo: yes
|
|
|
|
prompt: Enter some text
|
|
|
|
register: results
|
|
|
|
|
|
|
|
- name: Ensure that input was captured
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- results.user_input == 'hello there'
|
|
|
|
|
|
|
|
- pause:
|
|
|
|
echo: yes
|
|
|
|
prompt: Enter some text to edit
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- name: Ensure edited input was captured
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- result.user_input == 'hello tommy boy'
|
|
|
|
|
|
|
|
- pause:
|
|
|
|
echo: no
|
|
|
|
prompt: Enter some text
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- name: Ensure secret input was caputered
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- result.user_input == 'supersecretpancakes'
|