The only reason I wouldn't use vars_files is because vars_files is a keyword at play level, so you can't make it part of the role.
If it's a common file of variables though, the cleanest way is to just include the file as a role, and those variables will be made available to other roles. On Sun, Dec 8, 2013 at 3:55 PM, Matt Cordial <[email protected]> wrote: > On Saturday, December 7, 2013 12:22:16 PM UTC-7, Michael DeHaan wrote: >> >> >> - include_vars: ../roles/foo/vars/main.yml >> > > Thanks Michael, > > I've considered this. Is there a benefit to using include_vars over > specifying the path in the vars_files list? > > >> >> Though it seems like it might be better to just have the role depend on a >> common role, and set the variables there. >> >> >> > In my case I'm keeping "provisioning" and "deploy" as separate playbooks. > So installing/configuring the base services (like postgres) happens before > my app is configured with their settings. I don't want to run all of the > install/configure steps on those services every time I go to deploy. > > Thanks again, > > Matt > > > -- > 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. > -- Michael DeHaan <[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]. For more options, visit https://groups.google.com/groups/opt_out.
