Hello,
I am looking for a way to leverage Ansible Prompts directives to include
choice lists, or even just to include a dynamic prompt based on the results
of a url lookup.
This didn't work:
- hosts: all
vars:
directions: "North, South, East West"
vars_prompt:
- name: "choice"
prompt: "Pick a direction: {{ directions }}"
tasks:
- debug: msg=" directions = {{ directions }} choice = {{ choice }}"
The prompt doesn't replace the directions variable.
And this doesn't seem to work either:
- hosts: all
vars:
dir: "{{ lookup('pipe', './getDirFromUser.sh') }}"
tasks:
- debug: msg=" dir = {{ dir}} "
where the getDirFromuser.sh script would prompt for the direction.
Any thoughts on how I might be able to accomplish this?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/1c1b4fb5-0560-4f21-925c-08b9e5b6083a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.