« Previous 1 2 3
Explore automation-as-code with Ansible
Automated
Even More Automation
In practice, the automation presented here takes less than five minutes to set up a fully functional AWX server. After you have customized the vars.yml
and secrets.yml
files, simply start the code by typing:
ansible-playbook 00_awx_full.yml -ask-vault-password
You can use the old ansible-playbook
command-line tool here because the more modern ansible-navigator
tool unfortunately does not support an interactive --ask-vault-password
scenario.
Of course, the code leaves plenty of room for expansion. For example, you could add elements to create workflow and job templates. At the beginning of the rollout, tasks can be added that include the basic AWX setup, including LDAP and directory integration.
As mentioned at the beginning, you can also model the 00_awx_full
playbook as a workflow on an existing AWX server that can then be connected to a Git repository with your as-code declaration by callback or webhook while the Ansible-via-Ansible rollout runs as a GitOps pipeline, which can be triggered with a simple commit.
Conclusions
Structured YAML and Ansible make it easy to describe complete IT environments as code and roll them out automatically. The fully automated AWX setup is just the beginning. The as-code setups of several systems can then be linked to workflows in AWX: First the rollout of the physical or virtual systems, then the basic software, followed by the application data. The demo code definitely offers some room for improvement. The MicroShift scenario used here, including the AWX operator, can easily be rolled out under the same principle.
Although the AWX tool discussed here is still available, it has not been updated since June 2024 because the project is at end of life (EOL); however, it is presented as an "as-code skeleton," so it can be used for other applications.
Infos
- Automated AWX rollout: https://github.com/astolzen/awx_auto
- Installing AWX and Helm: https://ansible.readthedocs.io/projects/awx-operator-helm/helm-install-on-existing-cluster.html
- Galaxy: http://galaxy.ansible.com
« Previous 1 2 3
Buy this article as PDF
(incl. VAT)
Buy ADMIN Magazine
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Most Popular
Support Our Work
ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.
