10th exercise: user prompt
This commit is contained in:
parent
da27401954
commit
b6bd8e47db
|
@ -0,0 +1,14 @@
|
|||
# 10 - Prompt
|
||||
|
||||
This exercise makes you create a playbook that prompt the user for a value.
|
||||
|
||||
## Playbook Creation
|
||||
Create a playbook following the given specs:
|
||||
* Run on localhost
|
||||
* Prompt the user for a value
|
||||
* Use the debug module to print back the value
|
||||
|
||||
## Validation
|
||||
The playbook should run and print the typed value.
|
||||
|
||||
There is a working playbook in `solution/solution.yml`.
|
|
@ -0,0 +1,10 @@
|
|||
- hosts: localhost
|
||||
gather_facts: false
|
||||
vars_prompt:
|
||||
- name: prompted_value
|
||||
prompt: Enter a value
|
||||
tasks:
|
||||
- name: Print the prompted value
|
||||
debug:
|
||||
msg: "The value is: {{ prompted_value }}"
|
||||
# vim: set ft=yaml sw=2 et:
|
Loading…
Reference in New Issue