Error During building the Execution Environment for the AWX

**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

requirements.txt

# Core Ansible + Azure dependencies
ansible=8.5.0
ansible-core>=2.15.6
# ansible[azure]

# Core Azure libraries
azure-identity
azure-common
azure-cli-core
msrestazure
azure-storage-blob
azure-keyvault-secrets


# Remote Windows management
pypsrp==0.8.1

# Packaging tools (keep updated to avoid build issues)
pip>=25.0.1
setuptools>=65.0.0
wheel>=0.38.0

# Security / crypto fixes
cryptography==38.0.4
pyOpenSSL>=23.2.0
urllib3<1.27

# Fix for ansible-runner version conflict
ansible-runner>=2.3.0

requirements.yml

---
collections:
  - name: community.general
    version: "8.5.0"
    source: https://galaxy.ansible.com
  - name: awx.awx
    version: "23.3.0"
    source: https://galaxy.ansible.com  
  - name: azure.azcollection
    version: "3.8.0"
    source: https://galaxy.ansible.com
  - name: ansible.posix
    version: "1.5.4"
    source: https://galaxy.ansible.com 
  - name: ansible.windows
    version: "1.14.0"
    source: https://galaxy.ansible.com
  - name: community.windows
    version: "1.12.0"
    source: https://galaxy.ansible.com

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)
  • awx
  • galaxy-ng

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.

Hello @shrews ,
Thanks for your response. Could you please suggest any such image that I can give a try?

Does the other things like- execution-environment.yml, requirements.txt and requirements.yml looks Okay?

Thank you.

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.

hi @shrews ,
Thanks. I tried both -quay.io/rockylinux/rockylinux:9 and docker.io/redhat/ubi9:latest..

But getting this error consistently.

Running command:
  podman build -f context/Containerfile -t ops_awx_ee_azure:latest --no-cache context
...showing last 20 lines of output...
      Successfully uninstalled ansible-core-2.14.3
Successfully installed PyJWT-2.10.1 adal-1.2.7 aiohappyeyeballs-2.6.1 aiohttp-3.12.15 aiosignal-1.4.0 ansible-8.5.0 ansible-core-2.15.13 anyio-4.10.0 applicationinsights-0.11.10 ar
gcomplete-3.5.3 async-timeout-5.0.1 attrs-25.3.0 awxkit-24.6.1 azure-cli-core-2.75.0 azure-cli-telemetry-1.1.0 azure-common-1.1.28 azure-containerregistry-1.2.0 azure-core-1.31.0 a
zure-identity-1.19.0 azure-iot-hub-2.6.1 azure-keyvault-4.2.0 azure-keyvault-certificates-4.10.0 azure-keyvault-keys-4.11.0 azure-keyvault-secrets-4.10.0 azure-keyvault-securitydom
ain-1.0.0b1 azure-mgmt-apimanagement-4.0.1 azure-mgmt-authorization-4.0.0 azure-mgmt-automation-1.1.0b4 azure-mgmt-batch-17.3.0 azure-mgmt-cdn-13.1.1 azure-mgmt-compute-33.0.0 azur
e-mgmt-containerinstance-10.1.0 azure-mgmt-containerregistry-10.3.0 azure-mgmt-containerservice-32.1.0 azure-mgmt-core-1.4.0 azure-mgmt-cosmosdb-10.0.0b3 azure-mgmt-datafactory-9.0
.0 azure-mgmt-devtestlabs-10.0.0b2 azure-mgmt-dns-8.1.0 azure-mgmt-eventhub-11.1.0 azure-mgmt-hdinsight-9.1.0b1 azure-mgmt-iothub-3.0.0 azure-mgmt-keyvault-10.3.1 azure-mgmt-logana
lytics-13.0.0b7 azure-mgmt-managedservices-7.0.0b2 azure-mgmt-managementgroups-1.1.0b2 azure-mgmt-marketplaceordering-1.2.0b2 azure-mgmt-monitor-6.0.2 azure-mgmt-mysqlflexibleserve
rs-1.0.0b3 azure-mgmt-network-28.0.0 azure-mgmt-notificationhubs-8.1.0b1 azure-mgmt-nspkg-3.0.2 azure-mgmt-postgresqlflexibleservers-1.1.0 azure-mgmt-privatedns-1.2.0 azure-mgmt-rd
bms-10.2.0b17 azure-mgmt-recoveryservices-3.0.0 azure-mgmt-recoveryservicesbackup-9.1.0 azure-mgmt-redis-14.4.0 azure-mgmt-resource-23.2.0 azure-mgmt-resourcegraph-8.0.0 azure-mgmt
-resourcehealth-1.0.0b6 azure-mgmt-search-9.2.0b2 azure-mgmt-servicebus-8.2.1 azure-mgmt-sql-4.0.0b19 azure-mgmt-storage-21.2.1 azure-mgmt-trafficmanager-1.1.0 azure-mgmt-web-7.3.1
 azure-nspkg-3.0.2 azure-servicebus-7.14.2 azure-storage-blob-12.23.0b1 certifi-2025.8.3 cryptography-38.0.4 exceptiongroup-1.3.0 frozenlist-1.7.0 h11-0.16.0 h2-4.3.0 hpack-4.1.0 h
ttpcore-1.0.9 httpx-0.28.1 humanfriendly-10.0 hyperframe-6.1.0 importlib-resources-5.0.7 isodate-0.7.2 jmespath-1.0.1 jsonschema-4.25.1 jsonschema-specifications-2025.9.1 knack-0.1
1.0 microsoft-kiota-abstractions-1.9.7 microsoft-kiota-authentication-azure-1.9.7 microsoft-kiota-http-1.9.7 microsoft-kiota-serialization-form-1.9.7 microsoft-kiota-serialization-
json-1.9.7 microsoft-kiota-serialization-multipart-1.9.7 microsoft-kiota-serialization-text-1.9.7 microsoft-security-utilities-secret-masker-1.0.0b4 msal-1.33.0b1 msal-extensions-1
.2.0 msgraph-core-1.3.8 msgraph-sdk-1.6.0 msrest-0.7.1 msrestazure-0.6.4.post1 multidict-6.6.4 netaddr-1.3.0 numpy-2.0.2 oauthlib-3.3.1 opentelemetry-api-1.37.0 opentelemetry-sdk-1
.37.0 opentelemetry-semantic-conventions-0.58b0 oras-0.2.38 pandas-2.3.2 pip-25.2 pkginfo-1.12.1.2 portalocker-2.10.1 propcache-0.3.2 psutil-7.0.0 py-deviceid-0.1.1 pyOpenSSL-23.2.
0 pygments-2.19.2 pypsrp-0.8.1 pyspnego-0.12.0 python-dateutil-2.9.0.post0 pytz-2025.2 referencing-0.36.2 requests-oauthlib-2.0.0 rpds-py-0.27.1 setuptools-80.9.0 sniffio-1.3.1 std
-uritemplate-2.0.5 tabulate-0.9.0 typing-extensions-4.15.0 tzdata-2025.2 uamqp-1.6.11 wheel-0.45.1 xmltodict-1.0.0 yarl-1.20.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment i
nstead: https://pip.pypa.io/warnings/venv
+ cp /tmp/src/requirements.txt /output/requirements.txt
++ wc -l
++ ls -1 '/output/wheels/*whl'
+ '[' 0 -gt 0 ']'
+ '[' -z ']'
+ /usr/bin/dnf clean all
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

32 files removed
+ rm -rf /var/cache/dnf /var/cache/yum
+ rm -rf /var/lib/dnf/history.sqlite /var/lib/dnf/history.sqlite-shm /var/lib/dnf/history.sqlite-wal
+ rm -rf /var/log/dnf.librepo.log /var/log/dnf.log /var/log/dnf.rpm.log /var/log/hawkey.log
+ rm -rf /tmp/venv
Error: committing container for step {Env:[PKGMGR_PRESERVE_CACHE= ANSIBLE_GALAXY_CLI_COLLECTION_OPTS= ANSIBLE_GALAXY_CLI_ROLE_OPTS= ANSIBLE_INSTALL_REFS=ansible-core==2.14.3 ansibl
e-runner PKGMGR=/usr/bin/dnf EE_BASE_IMAGE=docker.io/redhat/ubi9:latest PYCMD=/usr/bin/python3 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin container=oci PIP_B
REAK_SYSTEM_PACKAGES=1 ANSIBLE_GALAXY_SERVER=https://galaxy.ansible.com ANSIBLE_GALAXY_DISABLE_GPG_VERIFY=1] Command:run Args:[/output/scripts/assemble] Flags:[] Attrs:map[] Messag
e:RUN /output/scripts/assemble Heredocs:[] Original:RUN /output/scripts/assemble}: copying layers and metadata for container "60bef6b750c2f6bd753adb318c3ecaaa1a4194e700b3aed7518995
1625555097": initializing source containers-storage:80e5f68ab76f-working-container: storing layer "5e98ee6578088bc476b8d77b28757c522ded3ae39f3ce406c33f84fc47e7039c" to file: io: re
ad/write on closed pipe

An error occurred (rc=125), see output line(s) above for details.
[root@apsocloudapp01 ops-awx-ee]# 
[root@apsocloudapp01 ops-awx-ee]# podman system reset -f
 A "/etc/containers/storage.conf" config file exists.
Remove this file if you did not modify the configuration.