Skip to content

Commit

Permalink
Silence Ansible devel warning, again (#956)
Browse files Browse the repository at this point in the history
Silence Ansible devel warning, again

I rebuilt the image fresh and was very annoyed by getting this error running completely unrelated commands in the image
[WARNING]: You are running the development version of Ansible. You should only run Ansible from
"devel" if you are modifying the Ansible engine, or trying out features under development. This
is a rapidly changing source of code and can become unstable at any point.

It turns out that this is silenced in the ansible-galaxy command in the entrypoint.sh script, but the same problem happens again just a few lines down doing ansible --version, and this case is not silenced.
This applies the same method to the second case, so that this will run quiet:
(env) [alancoding@alan-red-hat ansible-runner]$ podman run --rm --tty --interactive --env AWX_ISOLATED_DATA_DIR=/runner/ quay.io/ansible/ansible-runner:devel whoami
[WARNING]: You are running the development version of Ansible. You should only
run Ansible from "devel" if you are modifying the Ansible engine, or trying out
features under development. This is a rapidly changing source of code and can
become unstable at any point.
root

Reviewed-by: Alexander Sowitzki <dev@eqrx.net>
Reviewed-by: David Shrewsbury <None>
Reviewed-by: None <None>
  • Loading branch information
AlanCoding committed Jan 13, 2022
1 parent 99f5bd7 commit 891a8ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/entrypoint.sh
Expand Up @@ -36,7 +36,7 @@ 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
fi
ansible --version | head -n 1 > ${AWX_ISOLATED_DATA_DIR}/ansible_version.txt
ansible --version 2> /dev/null | head -n 1 > ${AWX_ISOLATED_DATA_DIR}/ansible_version.txt
fi

SCRIPT=/usr/local/bin/dumb-init
Expand Down

0 comments on commit 891a8ad

Please sign in to comment.