**Error During building the Execution Environment for the AWX
Below are my code:
execution-environment.yml
version: 3
images:
base_image:
name: quay.io/ansible/ansible-runner:stable-2.12-latest
dependencies:
python: requirements.txt
system: bindep.txt
galaxy: requirements.yml
additional_build_steps:
prepend_base: |
ENV ANSIBLE_GALAXY_SERVER=https://galaxy.ansible.com
ENV ANSIBLE_GALAXY_DISABLE_GPG_VERIFY=1
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc
RUN curl -sL https://packages.microsoft.com/config/rhel/8/prod.repo -o /etc/yum.repos.d/microsoft.repo
RUN yum -y install gcc python3-devel openssl-devel krb5-devel azure-cli && yum clean all
append_final: |
RUN pwsh -Command "Install-Module -Name Az -Repository PSGallery -Force -Scope AllUsers -AllowClobber"
bindep.txt
# Required for building Python packages
gcc
python3-devel [platform:rpm compile]
libffi-devel [platform:rpm]
openssl-devel [platform:rpm]
make [platform:rpm]
# Azure CLI and SDK support
azure-cli
# Optional but useful tools
git
powershell
I am pulling these from a github repository and running the below command from one of the Linux Virtual Machine (hosted on Azure)
Command that I am running to Build an Image -
ansible-builder build -t ops_awx_ee_azure:latest -f execution-environment.yml --no-cache
Here is the Error that I am getting:
File context/_build/requirements.yml had modifications and will be rewritten
File context/_build/requirements.txt had modifications and will be rewritten
Running command:
podman build -f context/Containerfile -t ops_awx_ee_azure:v2 --no-cache context
...showing last 20 lines of output...
--> 0227da24e95b
[2/4] STEP 9/13: COPY _build /build
--> 47c17eb49b93
[2/4] STEP 10/13: WORKDIR /build
--> 8d0700a96b00
[2/4] STEP 11/13: RUN mkdir -p /usr/share/ansible
--> 37c989d999b6
[2/4] STEP 12/13: RUN ansible-galaxy role install $ANSIBLE_GALAXY_CLI_ROLE_OPTS -r requirements.yml --roles-path "/usr/share/ansible/roles"
Skipping install, no requirements found
--> 2144df9ccd9d
[2/4] STEP 13/13: RUN ANSIBLE_GALAXY_DISABLE_GPG_VERIFY=1 ansible-galaxy collection install $ANSIBLE_GALAXY_CLI_COLLECTION_OPTS -r requirements.yml --collections-path "/usr/share/a
nsible/collections"
Starting galaxy collection install process
Process install dependency map
[WARNING]: Skipping Galaxy server https://galaxy.ansible.com/api/. Got an
unexpected error when getting available versions of collection
community.general: '/api/v3/plugin/ansible/content/published/collections/index/
community/general/versions/'
ERROR! Unexpected Exception, this is probably a bug: '/api/v3/plugin/ansible/content/published/collections/index/community/general/versions/'
to see the full traceback, use -vvv
Error: building at STEP "RUN ANSIBLE_GALAXY_DISABLE_GPG_VERIFY=1 ansible-galaxy collection install $ANSIBLE_GALAXY_CLI_COLLECTION_OPTS -r requirements.yml --collections-path "/usr/
share/ansible/collections"": while running runtime: exit status 250
An error occurred (rc=250), see output line(s) above for details.
Could you please help me As soon as possible as we are stuck from many days trying many things?
Thank you in advance.
Thanks & Regards,
Suhas Chandrashekar
Set at least one tag (the experts follow the tags, so the right people will find you if you tag)
Choose another base image. This one is VERY old and should not be used. You’ll want a RHEL-ish image (RHEL, fedora, centos, etc.) with a recent-ish Python.
I won’t select one for you as there are many images that will work. The EE documentation has some examples you can select from, but there even more recent versions of those (and many unlisted) that you can search for and experiment with.