From bf025b415d33f00aba4dcb332273805659f54d52 Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Tue, 3 Feb 2026 16:43:41 +0100 Subject: [PATCH 1/4] Update ansible-core to v2.19 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5014619..5b1fcad 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -ansible-core==2.16.* +ansible-core==2.19.* ansible-runner awxkit kubernetes From 50d9c7495861492a8584c63a2810249aaf3df5c0 Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Thu, 5 Feb 2026 18:31:20 +0100 Subject: [PATCH 2/4] Add wrapper for ansible-playbook This is needed because with ansible-2.19 our printf >/dev/tty hack is no longer working, so we need to switch to our own output plugin. The problem is that the "null" output plugin has been hardcoded in the patternizer so what we do is use our own plugin if we see it is set the null. --- Containerfile | 8 ++++++-- ansible-playbook-wrapper.sh | 6 ++++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 ansible-playbook-wrapper.sh diff --git a/Containerfile b/Containerfile index 97a05ae..59da24c 100644 --- a/Containerfile +++ b/Containerfile @@ -32,12 +32,11 @@ ARG YQ_VERSION="4.40.7" ARG TEA_VERSION="0.9.2" # As of 9/5/2024: awxkit is not compatible with python 3.12 due to setuptools -# Ansible-core 2.16 is needed for losing track of async jobs (as noted in AGOF for infra.controller_configuration) +# Ansible-core 2.19 is needed for losing track of async jobs (as noted in AGOF for infra.controller_configuration) # 'pip' will be influenced by where /usr/bin/python3 points, which we take care of with the altnernatives # command ARG PYTHON_VERSION="3.11" ARG PYTHON_PKGS="python${PYTHON_VERSION} python${PYTHON_VERSION}-pip python3-pip" -ARG ANSIBLE_CORE_SPEC="ansible-core==2.16.*" # amd64 - arm64 ARG TARGETARCH @@ -118,9 +117,14 @@ ENV PIP_BREAK_SYSTEM_PACKAGES=1 # Add requirements.yml file for ansible collections COPY requirements.yml /tmp/requirements.yml COPY requirements.txt /tmp/requirements.txt +COPY ansible-playbook-wrapper.sh /tmp/ansible-playbook-wrapper.sh RUN pip install --no-cache-dir -r /tmp/requirements.txt && \ ansible-galaxy collection install --collections-path /usr/share/ansible/collections -r /tmp/requirements.yml && \ +# Create ansible-playbook wrapper that sets ANSIBLE_STDOUT_CALLBACK to rhvp.cluster_utils.readable when it's "null" \ +mv /usr/local/bin/ansible-playbook /usr/local/bin/ansible-playbook.orig && \ +cp /tmp/ansible-playbook-wrapper.sh /usr/local/bin/ansible-playbook && \ +chmod +x /usr/local/bin/ansible-playbook && \ rm -rf /usr/local/lib/python${PYTHON_VERSION}/site-packages/ansible_collections/$COLLECTIONS_TO_REMOVE && \ curl -L -O https://raw.githubusercontent.com/clumio-code/azure-sdk-trim/main/azure_sdk_trim/azure_sdk_trim.py && \ python3 azure_sdk_trim.py && rm azure_sdk_trim.py && pip uninstall -y humanize && \ diff --git a/ansible-playbook-wrapper.sh b/ansible-playbook-wrapper.sh new file mode 100644 index 0000000..9ce2615 --- /dev/null +++ b/ansible-playbook-wrapper.sh @@ -0,0 +1,6 @@ +#!/bin/bash +# Wrapper script for ansible-playbook that sets ANSIBLE_STDOUT_CALLBACK when needed +if [ "${ANSIBLE_STDOUT_CALLBACK}" = "null" ]; then + export ANSIBLE_STDOUT_CALLBACK="rhvp.cluster_utils.readable" +fi +exec /usr/local/bin/ansible-playbook.orig "$@" \ No newline at end of file From 7d06933bf84a35515aa20f3301e27c9ee14ea41c Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Thu, 5 Feb 2026 22:27:16 +0100 Subject: [PATCH 3/4] Disable inventory unparsed warning unconditionally --- ansible-playbook-wrapper.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible-playbook-wrapper.sh b/ansible-playbook-wrapper.sh index 9ce2615..fd6f13c 100644 --- a/ansible-playbook-wrapper.sh +++ b/ansible-playbook-wrapper.sh @@ -3,4 +3,5 @@ if [ "${ANSIBLE_STDOUT_CALLBACK}" = "null" ]; then export ANSIBLE_STDOUT_CALLBACK="rhvp.cluster_utils.readable" fi -exec /usr/local/bin/ansible-playbook.orig "$@" \ No newline at end of file +export ANSIBLE_INVENTORY_UNPARSED_WARNING=False +exec /usr/local/bin/ansible-playbook.orig "$@" From be79b19635574f33e86c0e25fe9732e4d7f1e7cb Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Mon, 16 Feb 2026 12:52:25 +0100 Subject: [PATCH 4/4] Make ansible-playbook-wrapper.sh executable --- ansible-playbook-wrapper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 ansible-playbook-wrapper.sh diff --git a/ansible-playbook-wrapper.sh b/ansible-playbook-wrapper.sh old mode 100644 new mode 100755 index fd6f13c..f4cdef0 --- a/ansible-playbook-wrapper.sh +++ b/ansible-playbook-wrapper.sh @@ -1,7 +1,7 @@ #!/bin/bash # Wrapper script for ansible-playbook that sets ANSIBLE_STDOUT_CALLBACK when needed if [ "${ANSIBLE_STDOUT_CALLBACK}" = "null" ]; then - export ANSIBLE_STDOUT_CALLBACK="rhvp.cluster_utils.readable" + export ANSIBLE_STDOUT_CALLBACK="rhvp.cluster_utils.readable" fi export ANSIBLE_INVENTORY_UNPARSED_WARNING=False exec /usr/local/bin/ansible-playbook.orig "$@"