Menu

Virtual Geek

Tales from real IT system administrators world and non-production environment

Ansible AWX installation error docker-compose run --rm --service-ports task awx-manage migrate --no-input

This was another error I saw while deploying Ansible AWX on ubuntu linux. 

Ansible AWX installation error Cannot have both the docker-py and docker python modules
Install Ansible AWX Tower on Ubuntu Linux

TASK [local_docker :  Run migrations in task container]
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "docker-compose run --rm --service-ports task awx-manage migrate --no-input", "delta": "0:00:06.436376", "end": "2021-01-23 12:11:19.946511", "msg": "non-zero return code", "rc": 1, "start": "2021-01-23 12:11:13.510135", "stderr": "Pulling redis (redis:)...\nGet https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io: Temporary failure in name resolution", "stderr_lines": ["Pulling redis (redis:)...", "Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io: Temporary failure in name resolution"], "stdout": "", "stdout_lines": []}

ansible awx installation ubuntu linux docker-compose run --rm --service-ports task awx-manage migrate --no-input delta non-zero return code registry-1.docker.io lookup.png

The cause of the error is due to docker is not able to (connect to internet) download the container images from online repository, on my linux server I don't have direct access to internet. I use proxy for my Virtual Machines. Proxy for docker can be set with below settings.

mkdir /etc/systemd/system/docker.service.d

cat > /etc/systemd/system/docker.service.d/http-proxy.conf
[service]
Environment="HTTP_PROXY=<IP>:<Port>"
Environment="HTTPS_PROXY=<IP>:<Port>"
Environment="NO_PROXY=localhost,127.0.0.1,localaddress,.localdomain.com"

cat /etc/systemd/system/docker.service.d/http-proxy.conf

sudo systemctl daemon-reload
sudo systemctl restart docker

ansible awx installation on ubuntu linux mkdir etc systemd system docker.service.d http-proxy.conf environment https_proxy No_proxy awx installer sudo daemon-reload systemctl restart docker service.png

Useful Articles
How to install Docker on Linux
 How to install Ansible on Linux for vSphere configuration
Getting started Ansible AWX tower for IT automation run first playbook
Ansible for VMwary Using vmware_vm_inventory dynamic inventory plugin
Ansible selectattr The error was TemplateRuntimeError no test named 'equalto'
ansible create an array with set_fact
Ansible get information from esxi advanced settings nested dictionary with unique keynames

Go Back

Comment

Blog Search

Page Views

4688542

Follow me on Blogarama