On Tuesday, May 10, 2016 at 10:27:58 PM UTC-7, J Hawkesworth wrote: > > I don't know what other people do - I suspect it varies a lot according to > use and team size - ansible is very flexible after all, but for what its > worth I moved all my playbooks out of root and into dirs a while ago as > they were getting out of control too. > > I have dirs like > > plays/provision (putting the software stack in place for each type of > server) > plays/update (install latest versions of software components) > plays/untested (where I work up new plays) > plays/operations (check things, rolling restarts etc) >
Do you use an ansible.cfg in the playbook directory, or just a global one? I guess you could use symlinks in each of those directories so you only have to maintain one copy... > I do however keep all my roles in a single roles dir and so far have > managed not to have any roles which are 'private' to the playbook dirs. To > me this maximizes the re-use I can get out of roles. > I make use of playbook includes to run multiple playbooks where > appropriate in some cases too. > > As far as vars are concerned I have several inventory files and at least 1 > group_vars (directory) per inventory so I can set vars for each environment > independently, where necessary. > So you don't find any times you wish you could share variables across playbook groups? We have things like ansible_ssh_user defined in host_vars, and some common "we use this value in a bunch of places" variables in another vars file, and I'm hesitant about duplicating them. > Hope this helps > Yes, 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]. 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/a8b574eb-e0fc-4a49-bda8-392e82a5fe43%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
