Debian Codegraph @

src/ansiblelint/rules/no_prompting.md

raw symbols SCIP
1 # no-prompting
2
3 This rule checks for `vars_prompt` or the `ansible.builtin.pause` module in playbooks.
4 You should enable this rule to ensure that playbooks can run unattended and in CI/CD pipelines.
5
6 This is an opt-in rule.
7 You must enable it in your Ansible-lint configuration as follows:
8
9 ```yaml
10 enable_list:
11 - no-prompting
12 ```
13
14 ## Problematic Code
15
16 ```yaml
17 ---
18 - name: Example playbook
19 hosts: all
20 vars_prompt: # <- Prompts the user to input credentials.
21 - name: username
22 prompt: What is your username?
23 private: false
24
25 - name: password
26 prompt: What is your password?
27 tasks:
28 - name: Pause for 5 minutes
29 ansible.builtin.pause:
30 minutes: 5 # <- Pauses playbook execution for a set period of time.
31 ```
32
33 ## Correct Code
34
35 Correct code for this rule is to omit `vars_prompt` and the `ansible.builtin.pause` module from your playbook.