From b10b166aaad970a56e373c7b432261ac3dc6a84a Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Tue, 5 Dec 2023 16:25:54 +0100 Subject: [PATCH] Install setuptools before creating virtualenv The setuptools package is required to create a virtualenv with Ansible. This should fix the following error seen on Rocky Linux 9 when setuptools is missing: Failed to import the required Python library (setuptools) on seed0's Python /usr/bin/python3. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter Change-Id: Ie22b8d8794126e93af511fef2960b63ee3d3f75a --- ansible/kayobe-target-venv.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ansible/kayobe-target-venv.yml b/ansible/kayobe-target-venv.yml index 8d51ee448..8b67d2c7f 100644 --- a/ansible/kayobe-target-venv.yml +++ b/ansible/kayobe-target-venv.yml @@ -54,6 +54,12 @@ mode: 0700 become: True + - name: Ensure Python setuptools is installed + package: + name: python3-setuptools + state: present + become: True + - name: Ensure kayobe virtualenv has the latest version of pip installed pip: name: pip