AWX Best Practices (Inventories and Workflows)

131 views
Skip to first unread message

Bobby Brockway

unread,
Oct 12, 2017, 10:49:35 AM10/12/17
to Ansible Project
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 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

Bobby Brockway

unread,
Oct 17, 2017, 8:20:15 AM10/17/17
to Ansible Project
Bump

Andrew Latham

unread,
Oct 17, 2017, 8:53:25 AM10/17/17
to ansible...@googlegroups.com
AWX has a mailing list at AWX Project <awx-p...@googlegroups.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 ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/49964350-e720-4a13-a25a-89aef20dfbec%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
- Andrew "lathama" Latham lat...@gmail.com http://lathama.com -

Bobby Brockway

unread,
Oct 17, 2017, 9:06:52 AM10/17/17
to Ansible Project
Ah didn't realise, thanks Andrew.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages