From a853e30c1e4b42fa748bb99e3f55de1c528b85a5 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Mon, 28 Jul 2025 17:25:45 +0200 Subject: [PATCH] chore(ansible,awx): improve installation commands --- knowledge base/ansible.md | 7 +++++-- knowledge base/awx.md | 5 +++-- snippets/awx.sh | 9 +++++---- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/knowledge base/ansible.md b/knowledge base/ansible.md index 1dfd105..eb119d4 100644 --- a/knowledge base/ansible.md +++ b/knowledge base/ansible.md @@ -60,9 +60,13 @@
Setup +> [!tip] +> Prefer installing Ansible in a project's Python virtual environment. + ```sh # Install. -pip3 install --user 'ansible' +pipx install 'ansible' +pip3 install --user --require-virtualenv 'ansible' brew install 'ansible' 'sshpass' # darwin sudo pamac install 'ansible' 'sshpass' # manjaro linux @@ -1688,7 +1692,6 @@ Another _better (?)_ solution in playbooks/roles would be to sanitize the input [Rundeck]: rundeck.md [Semaphore UI]: semaphoreui.md - [examples]: ../examples/ansible/ [examples templating]: ../examples/ansible/templating.yml diff --git a/knowledge base/awx.md b/knowledge base/awx.md index 468910d..e6eed5d 100644 --- a/knowledge base/awx.md +++ b/knowledge base/awx.md @@ -958,8 +958,9 @@ AWX offers the `awx` client CLI tool: ```sh # Install the 'awx' client -pipx install 'awxkit' -pip3 install --user 'awxkit' +# As of 2025-07-28, Python 3.11 is the last Python version for which the AWX CLI works correctly. +pipx install --python '3.11' 'awxkit' +pip3.11 install --user 'awxkit' ``` > [!tip] diff --git a/snippets/awx.sh b/snippets/awx.sh index bd168bb..79e42bf 100644 --- a/snippets/awx.sh +++ b/snippets/awx.sh @@ -1,9 +1,10 @@ #!/usr/bin/env sh -# Install the 'awx' client -pipx install 'awxkit' -pip3 install --user 'awxkit' -pip install 'git+https://github.com/ansible/awx.git@24.6.1#egg=awxkit&subdirectory=awxkit' +# Install the 'awx' client. +# As of 2025-07-28, Python 3.11 is the last Python version for which the AWX CLI works correctly. +pipx install --python '3.11' 'awxkit' +pip3.11 install --user 'awxkit' +pip3.11 install 'git+https://github.com/ansible/awx.git@24.6.1#egg=awxkit&subdirectory=awxkit' # Normally `awx` would require setting the configuration every command like so: # awx --conf.host https://awx.example.org --conf.username 'admin' --conf.password 'password' config