summaryrefslogtreecommitdiff
path: root/test/integration/targets/pause/pause-5.yml
blob: 2a2b1548207be01f97e989edd309ab0b02868990 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
- 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'