Ansible AWX (or its commercial counterpart, Red-Hat’s Ansible Tower) is a Web UI driven tool for enterprise deployment automation based on Ansible. Gitlab is an increasingly popular git-based repository manager with a lot of side-options. The two can really play into each other’s strengths with a bit of tinkering.

AWX really wants to be deployed into Kubernetes or a similar docker-based orchestration solution like OpenShift - just read the docs. This means it wants to be as stateless as possible following the K8s core philosophy, which consequently also means you should store all your plays, inventories and roles somewhere else — which is where Gitlab kicks in.

To be honest, I tried to circumvent the AWX intended deployment scenario for a while and while it worked, it was nowhere near optimal. For instance, I deployed an unofficial RPM-based AWX distibution into a CentOS VM, installed additional prerequisites directly into it’s virtualenv, played around fixing various path so the AWX Ansible worker can find them, etc. But it wasn’t elegant — it was more of a hack job, which made any upgrade or change of workflow a pain to plan or execute.

#awx #gitlab-ci #ansible #kubernetes

Implementing Ansible AWX — Gitlab integration
5.25 GEEK