From 184b44e5409169e2753648e8c2a8c2c9be18d332 Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Thu, 3 Feb 2022 15:22:27 -0500 Subject: [PATCH 1/2] Add special logic to make new EEs work with old runner --- utils/entrypoint.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/utils/entrypoint.sh b/utils/entrypoint.sh index 4cbf25dab..90d24aca3 100755 --- a/utils/entrypoint.sh +++ b/utils/entrypoint.sh @@ -24,6 +24,15 @@ EOF fi +if [[ -n "${LAUNCHED_BY_RUNNER}" ]]; then + # Special actions to be compatible with old ansible-runner versions, 2.1.x specifically + RUNNER_CALLBACKS=$(python3 -c "import from ansible_runner.display_callback.callback import awx_display; print(awx_display.__file__)") + export ANSIBLE_CALLBACK_PLUGINS="$(dirname $RUNNER_CALLBACKS)" + + # old versions split the callback name between awx_display and minimal, but new version just uses awx_display + export ANSIBLE_STDOUT_CALLBACK=awx_display +fi + if [[ -d ${AWX_ISOLATED_DATA_DIR} ]]; then if output=$(ansible-galaxy collection list --format json 2> /dev/null); then echo $output > ${AWX_ISOLATED_DATA_DIR}/collections.json From ab4bc4140a420f8d091ae0868612dd5b25a2d7a2 Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Thu, 3 Feb 2022 21:52:58 -0500 Subject: [PATCH 2/2] fix syntax error --- utils/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/entrypoint.sh b/utils/entrypoint.sh index 90d24aca3..bf85971da 100755 --- a/utils/entrypoint.sh +++ b/utils/entrypoint.sh @@ -26,7 +26,7 @@ fi if [[ -n "${LAUNCHED_BY_RUNNER}" ]]; then # Special actions to be compatible with old ansible-runner versions, 2.1.x specifically - RUNNER_CALLBACKS=$(python3 -c "import from ansible_runner.display_callback.callback import awx_display; print(awx_display.__file__)") + RUNNER_CALLBACKS=$(python3 -c "from ansible_runner.display_callback.callback import awx_display; print(awx_display.__file__)") export ANSIBLE_CALLBACK_PLUGINS="$(dirname $RUNNER_CALLBACKS)" # old versions split the callback name between awx_display and minimal, but new version just uses awx_display