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
This commit is contained in:
Pierre Riteau 2023-12-05 16:25:54 +01:00
parent 46bba8eb27
commit b10b166aaa

@ -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