Last active
February 5, 2024 19:15
-
-
Save neohitokiri/a5e03053b5b8fbc7656ac1f9cc0928ec to your computer and use it in GitHub Desktop.
Install Ansible AWX on Ubuntu 22.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install AWX 17.1.0 on Ubuntu 22.04 | |
DEBIAN_FRONTEND=noninteractive | |
sudo apt update && sudo apt upgrade -y | |
# Start Python installation | |
sudo apt install python3-pip python-setuptools -y | |
# End Python installation | |
# Start Ansible installation | |
sudo pip3 install ansible | |
# End Ansible installation | |
# Start Docker installation | |
sudo apt install docker docker.io -y | |
sudo apt remove docker -y | |
sudo pip3 install docker==6.1.3 docker-compose | |
# End Docker installation | |
# Start AWX installation | |
sudo usermod -aG docker $USER | |
sudo apt install git vim pwgen -y | |
git clone https://github.com/ansible/awx.git --branch 17.1.0 --depth 1 | |
cd awx/installer | |
SECRET_KEY=$(pwgen -N 1 -s 30) | |
sudo sed -i "s/secret_key=.*/secret_key=$SECRET_KEY/" inventory | |
sudo sed -i 's/# admin_password=/admin_password=/' inventory | |
PASSWORD=the_password | |
sudo sed -i "s/admin_password=.*/admin_password=$PASSWORD/" inventory | |
sudo ansible-playbook -i inventory install.yml | |
sudo docker ps | |
# End AWX installation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment