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.

The Author

Andreas Stolzenberger worked as an IT magazine editor for 17 years. He was the deputy editor in chief of the German Network Computing magazine from 2000 to 2010. After that, he worked as a solution engineer at Dell and VMware. In 2012 Andreas moved to Red Hat. There, he currently works as principal solution architect in the Technical Partner Development department.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs



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.

Learn More”>
	</a>

<hr>		    
			</div>
		    		</div>

		<div class=