Hi Michael, Has this ever been implemented ?
With Vault especially, it seems like a sensible pattern to have a separate encrypted file in vars/ for credentials, next to main.yml Having to specify include_vars or vars_files explicitly each time feels a little clumsy : shouldn't one reasonably expect a directory named "vars" to have some magic meaning and consider all of its contents automatically (like group_vars and inventory directories do) ? Since vars/ also doesn't serve as a default path for include_vars in role tasks (AFAIK, you have to explicitly say "../vars/xxx.yml"), technically it might as well be just "roles/x/vars.yml", right ? > Variable files can't do includes, no. > > vars_files is the way to go. > > > On Tue, May 21, 2013 at 9:45 AM, benno joy <[email protected] > <javascript:>> wrote: > >> Actually i meant vars_files: but i guess even that doesn't seem to work >> in vars/main.yml, so i guess the only option might be to include it in your >> main playbook. but i will wait for others to also comment. >> >> Thanks, >> Benno >> >> >> On Tue, May 21, 2013 at 6:34 PM, <[email protected] <javascript:>> >> wrote: >> >>> Thank you, but this does not seem to be working. Are you sure it's >>> "var_files" and not "vars_files"? I've tried a number of options, with and >>> without quotes around the filename, but no luck. >>> >>> I do appreciate your help, thank you again! >>> >>> >>> On Tuesday, May 21, 2013 8:48:57 AM UTC-4, benno joy wrote: >>> >>>> Could you try this for now >>>> >>>> in main.yml >>>> var_files: >>>> - "../var1.yml" >>>> >>>> Also i guess a feature request has been made for automatic inclusion of >>>> all vars file, so down the line this should work without manual inclusion. >>>> >>>> - Benno >>>> >>>> >>>> >>>> >>>> >>>> On Tue, May 21, 2013 at 6:01 PM, <[email protected]> wrote: >>>> >>>>> I'm using roles for template building, and would like to understand >>>>> the use the of the vars directory a bit more. From the docs, I see that >>>>> ansible will automatically pick up roles/{role}/vars/main.yml. But let's >>>>> say that I want to put multiple var files in the vars directory. Is >>>>> there >>>>> a way to tell ansible to pickup not only main.yml, but every other *.yml >>>>> file in that directory as well? >>>>> >>>>> Thank you! >>>>> >>>>> -- >>>>> 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]. >>>>> >>>>> 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] <javascript:>. >>> 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] <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > > > -- > Michael DeHaan <[email protected] <javascript:>> > 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/77d45732-6092-4310-8861-eb18f6c53bb6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
