As our company is growing and our use of Ansible grows with it, we're starting to struggle a bit with organization of our Ansible configs. The primary problem is that while we have things organized according to the documented best practices, those docs put all the playbooks at the root level, and we're starting to get many of those.
Each playbook is fairly simple - a few chunks of code for provisioning an instance, a few chunks for setting up the firewall rules, and a list of roles to apply to the servers. However, this is enough stuff that it's a bit messy including all of these in one giant file, so we have them split out by group, with a top-level file that includes them all. This also helps speed things up quite a bit, as we can run only the playbook we've changed, rather than check every single piece of configuration on every single server in the fleet. However, since we're getting a lot of different services we're supporting, this ends up with a lot of different playbooks hanging out in the root. If we put them in a subredirectory, then they can no longer access the roles, variables, etc. So far, the options I've considered are: 1. Deal with it as-is. 2. Move everything into one playbook (less than ideal, for the reasons stated above). 3. Move them into a directory structure and write a wrapper around ansible that adjusts ANSIBLE_CONFIG etc. to point to the correct places. 4. Split up our entire ansible directory structure into separate components, each with their own roles, vars, etc. and put common shared functionality into a separate location that's then pointed to by roles_path. 5. Move everything into one playbook and use tags to allow us to easily-ish run only certain projects' configuration. Is there a community consensus on how to handle organization when supporting a large number of mostly disparate apps? -- 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/d69f8b1e-397a-4be7-a7f7-9b894ae13ab1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
