ansible/test/integration/targets/pause/pause-5.yml
Sam Doran dbcecb64b8
Fix ctrl+c in pause module and add tests (#40134) (#40480)
Backport # 40134 - Ensure Ctrl+C interrupt for pause module works in all cases
2018-05-22 13:11:21 -04:00

35 lines
741 B
YAML

- name: Test pause module echo output
hosts: testhost
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'