Hi all,

I've been playing with AWX in a POC environment but I'm having trouble 
working out the best way to lay out our inventories, jobs and workflows. 
The Best Practices 
<http://docs.ansible.com/ansible-tower/latest/html/userguide/best_practices.html>
 guide 
in the docs isn't exactly extensive so hopefully someone here will be able 
to help.

We've already started putting roles into their own Galaxy-style 
repositories, for example:

.
|-- defaults
| `-- main.yml
|-- files
|-- handlers
| `-- main.yml
|-- meta
| `-- main.yml
|-- README.md
|-- tasks
| `-- main.yml
|-- templates
|-- tests
| |-- inventory
| `-- test.yml
`-- vars
 `-- main.yml


Then we've been using Git submodules to reference these in the individual 
jobs like so:

.
|-- action_plugins
|   `-- plugin.py
|-- ansible.cfg
|-- collector.yml
|-- group_vars
|   |-- all.yml
|   |-- dev.yml
|   `-- prod.yml
|-- inventories
|   |-- dev.ini
|   `-- prod.ini
|-- library
|   `-- module.py
|-- playbook.yml
|-- roles
|   |-- role1 (Git submodule)
|   `-- role2 (Git submodule)
`-- README.md


For AWX I know we'll have to replace the Git submodules with a 
requirements.yml file but my main question is around Workflow Templates. 
Specifically, with Workflow Templates available, what is the point of 
having Job Templates at all? Why aren't they just "Role Templates". With 
vanilla Ansible it makes sense to have a "job" called "Provision Web 
Server" for instance that pulls down the Java role, then the Tomcat role, 
then whatever else you need, but with Workflow Templates doesn't it just do 
that all for you? Wouldn't you just have a "Provision Web Server" Workflow 
Template that installs the Java "job" then the "tomcat" job and then 
whatever else you need, or am I missing a major point here?

How are you guys setting your jobs and workflows up?

My second question is around inventories. I can see these getting very 
messy very quickly with nests of groups and variables all over the place, 
especially if you have multiple teams creating different jobs all with 
their own variable names and ideas on how servers should be grouped for 
their stuff to be deployed successfully. How do you set up your 
inventories? Do you split them out by environment? By team? By job even? Do 
you have multiple inventories for different purposes, sometimes with the 
same server in a number of different ones?

I realise there's no cut-and-dry "best" way to do this yet but would be 
interested to hear about what you guys are already doing or planning to do!

Cheers,

Bobby

-- 
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/8b835a2c-9914-4304-8fd6-551be8adb5cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to