As politely as possible... Please don't share made-up syntax on this list, it confuses everyone :)
On Tue, Jan 28, 2014 at 12:25 PM, Adam Heath <[email protected]> wrote: > > The following is pseudo code, parts of it may not be entirely correct. > But the real trick is to use when. > > == > - name: ask for variable > when: my_var_name is not defined > register: my_var_name_result > vars_prompt: ..... > > - name: save vars > when: my_var_name_result.changed > $action: > > == > > On 01/28/2014 08:42 AM, Michael DeHaan wrote: > >> There's no mechanism for this. >> >> vars_prompt always prompts for the variable. >> >> >> >> >> On Tue, Jan 28, 2014 at 9:25 AM, Marcin Prączko >> <[email protected] <mailto:[email protected]>> wrote: >> >> Hi, >> >> Have question whether is possible (ansible 1.4.2 >) setup prompt for >> volue for variable in variable is not defined. >> >> For example: >> First run of playbook: >> - variable is not defined >> - ask for value >> - task write value of variable to some ansible vars file >> >> ... Do other tasks... >> >> Next run of playbook: >> - variable is read from ansible vars file >> - no prompt for value >> >> >> ... Do other tasks .... >> >> Tried find this in ansible help, but so far no luck. >> >> Best regards, >> Marcin Praczko >> >> -- >> 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] >> <mailto:ansible-project%[email protected]>. >> To post to this group, send email to >> [email protected] >> <mailto:[email protected]>. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> >> >> -- >> Michael DeHaan <[email protected] <mailto:[email protected] >> >> >> CTO, AnsibleWorks, Inc. >> http://www.ansibleworks.com/ >> >> -- >> 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]. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- > 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]. > For more options, visit https://groups.google.com/groups/opt_out. > -- 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/CA%2BnsWgxQm9UW3CDO01pd9ZxNMnLfe87CPmnus2jGOt164qFALw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
