Skip to content

Instantly share code, notes, and snippets.

@neohitokiri
Last active March 22, 2025 01:32
Show Gist options
  • Save neohitokiri/a5e03053b5b8fbc7656ac1f9cc0928ec to your computer and use it in GitHub Desktop.
Save neohitokiri/a5e03053b5b8fbc7656ac1f9cc0928ec to your computer and use it in GitHub Desktop.
Install Ansible AWX on Ubuntu 22.04
#!/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
@2000923
Copy link

2000923 commented Mar 22, 2025

Se presenta un error cuando ejecuto el código en la línea 31

requests.exceptions.InvalidURL: Not supported URL scheme http+docker
docker.errors.DockerException: Error while fetching server API version: Not supported URL scheme http+docker

Para corregir dicho error se procede instalando la versión de requests 2.31.0

pip uninstall requests
pip install requests==2.31.0

se ejecuta solo la línea 31 de manera individual

sudo ansible-playbook -i inventory install.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment