summaryrefslogtreecommitdiffstats
path: root/examples/playbooks/rule-no-prompting.yml
blob: 5f743032697e01d8c3bbb2897d1900319742523d (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
---
- name: Fixture for testing no-prompting rule, lines 5,17
  hosts: all
  vars_prompt:
    - name: username
      prompt: What is your username?
      private: false

    - name: password
      prompt: What is your password?

  tasks:
    - name: Pause for 5 minutes to build app cache
      ansible.builtin.pause:
        minutes: 5 # should not trigger because minutes is mentioned

    - name: A helpful reminder of what to look out for post-update
      ansible.builtin.pause:
        # should trigger no-prompting as neither seconds/minutes are mentioned
        prompt: "Make sure org.foo.FooOverload exception is not present"

- name: Fixture for testing if no vars_prompt is provided, lines 34-36
  hosts: all
  tasks:
    - name: Pause for 5 minutes to build app cache
      ansible.builtin.pause:
        minutes: 5 # should not trigger because minutes is mentioned