We’re trying to build our own awx-web image since need to install custom tools that are not in docker hub image. I was able to install and run successfully on a personal computer but having issues when I tried the same install inside Corporate network/VPN.
I understand why I see the error and trying to see how others were able workaround this issue.
The OS admin says that our servers don’t allow HTTP connections but allow HTTPS for these mirrors. Having said that is there a way to update the URLS to use HTTPS protocol or some other approach to move forward?
TASK [image_build : Build sdist builder image] *********************************************************************************************
task path: /Ansible/awx/installer/roles/image_build/tasks/main.yml:44
ESTABLISH LOCAL CONNECTION FOR USER: localid
EXEC /bin/sh -c ‘echo ~localid && sleep 0’
EXEC /bin/sh -c ‘( umask 77 && mkdir -p “echo /home/localid/.ansible/tmp
”&& mkdir “echo /home/localid/.ansible/tmp/ansible-tmp-1608247016.9-31193-210290861562789
” && echo ansible-tmp-1608247016.9-31193-210290861562789=“echo /home/localid/.ansible/tmp/ansible-tmp-1608247016.9-31193-210290861562789
” ) && sleep 0’
Using module file /usr/lib/python2.7/site-packages/ansible/modules/cloud/docker/docker_image.py
PUT /home/localid/.ansible/tmp/ansible-local-28263GuqLKx/tmpquaoa4 TO /home/localid/.ansible/tmp/ansible-tmp-1608247016.9-31193-210290861562789/AnsiballZ_docker_image.py
EXEC /bin/sh -c ‘chmod u+x /home/localid/.ansible/tmp/ansible-tmp-1608247016.9-31193-210290861562789/ /home/localid/.ansible/tmp/ansible-tmp-1608247016.9-31193-210290861562789/AnsiballZ_docker_image.py && sleep 0’
EXEC /bin/sh -c ‘/usr/bin/python /home/localid/.ansible/tmp/ansible-tmp-1608247016.9-31193-210290861562789/AnsiballZ_docker_image.py && sleep 0’
EXEC /bin/sh -c ‘rm -f -r /home/localid/.ansible/tmp/ansible-tmp-1608247016.9-31193-210290861562789/ > /dev/null 2>&1 && sleep 0’
fatal: [localhost]: FAILED! => {
“changed”: false,
“invocation”: {
“module_args”: {
“api_version”: “auto”,
“archive_path”: null,
“build”: {
“args”: {
“http_proxy”: “”,
“https_proxy”: “”,
“no_proxy”: “”
},
“cache_from”: null,
“container_limits”: null,
“dockerfile”: “Dockerfile.sdist”,
“etc_hosts”: null,
“http_timeout”: null,
“network”: null,
“nocache”: false,
“path”: “/Ansible/awx/installer/roles/image_build/files”,
“pull”: false,
“rm”: true,
“target”: null,
“use_config_proxy”: null
},
“buildargs”: null,
“ca_cert”: null,
“client_cert”: null,
“client_key”: null,
“container_limits”: null,
“debug”: false,
“docker_host”: “unix://var/run/docker.sock”,
“dockerfile”: null,
“force”: null,
“force_absent”: false,
“force_source”: true,
“force_tag”: false,
“http_timeout”: null,
“load_path”: null,
“name”: “awx_sdist_builder”,
“nocache”: false,
“path”: null,
“pull”: null,
“push”: false,
“repository”: null,
“rm”: true,
“source”: “build”,
“ssl_version”: null,
“state”: “present”,
“tag”: “16.0.0”,
“timeout”: 60,
“tls”: false,
“tls_hostname”: “localhost”,
“use_tls”: null,
“validate_certs”: false
}
},
}
PLAY RECAP *********************************************************************************************************************************
localhost : ok=8 changed=1 unreachable=0 failed=1 skipped=3 rescued=0 ignored=0
[localid@myhost awx]$
fatal: [localhost]: FAILED! => {
“changed”: false,
“invocation”: {
“module_args”: {
“api_version”: “auto”,
“archive_path”: null,
“build”: {
“args”: {
“http_proxy”: “”,
“https_proxy”: “”,
“no_proxy”: “”
},
“cache_from”: null,
“container_limits”: null,
“dockerfile”: “Dockerfile.sdist”,
“etc_hosts”: null,
“http_timeout”: null,
“network”: null,
“nocache”: false,
“path”: “/Ansible/awx//installer/roles/image_build/files”,
“pull”: false,
“rm”: true,
“target”: null,
“use_config_proxy”: null
},
“buildargs”: null,
“ca_cert”: null,
“client_cert”: null,
“client_key”: null,
“container_limits”: null,
“debug”: false,
“docker_host”: “unix://var/run/docker.sock”,
“dockerfile”: null,
“force”: null,
“force_absent”: false,
“force_source”: true,
“force_tag”: false,
“http_timeout”: null,
“load_path”: null,
“name”: “awx_sdist_builder”,
“nocache”: false,
“path”: null,
“pull”: null,
“push”: false,
“repository”: null,
“rm”: true,
“source”: “build”,
“ssl_version”: null,
“state”: “present”,
“tag”: “16.0.0”,
“timeout”: 60,
“tls”: false,
“tls_hostname”: “localhost”,
“use_tls”: null,
“validate_certs”: false
}
},
“msg”: "Error building awx_sdist_builder - code: 1, message: The command ‘/bin/sh -c dnf -y update && dnf -y install epel-release && dnf install -y bzip2 gcc-c++ gettext git make nodejs python3 python3-setuptools’ returned a non-zero code: 1, logs: [u’Step 1/7 : FROM centos:8’, u’\n’, u’ —> 300e315adb2f\n’, u’Step 2/7 : RUN dnf -y update && dnf -y install epel-release && dnf install -y bzip2 gcc-c++ gettext git make nodejs python3 python3-setuptools’, u’\n’, u’ —> Running in 2e222aab70ee\n’, u"\x1b[91mErrors during downloading metadata for repository ‘appstream’:\n - Status code: 401 for http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=container - Status code: 401 for http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=container - Status code: 401 for http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=container ", u’CentOS Linux 8 - AppStream 0.0 B/s | 0 B 00:00 \n’, u"\x1b[91mError: Failed to download metadata for repo ‘appstream’: Cannot prepare internal mirrorlist: Status code: 401 for http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=container “, u’Removing intermediate container 2e222aab70ee\n’]”
Thanks