Public
Snippet $10 authored by Kristopher Ruzic

Proof of Concept for skipping over vars_prompts by changing them to `pause...when....register`

Edited
proof.yml
---
  - name: Prompt that is skipped on extra-vars
    pause: prompt="enter val1, you didn't skip prompts"
    when: prompt_1 is not defined
    register: prompt_1

  - name: print off prompt_1
    debug: var=prompt_1.user_input
    
# to skip over the prompt, pass `--extra-vars '{"prompt_1": {"user_input": "test"}}''` on the command line.
# we can also specify the extra-vars in a json file, which would be easier and work better. To do this, pass `--extra-vars "@{{json_file.json}}"`