-2

Ubuntu 21.10 Ansible 2.10.8 hcloud 1.16.0 Python 3.9.7

Running an Ansible playbook on a fresh installation of Ansible and Hetzner's hcloud Python module, an error shows up and the script is aborted: Failed to import the required Python library (hcloud-python) on laptop'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

The playbook runs perfectly fine on a MacBook Pro laptop with Ansible 2.11.1 and hcloud 1.12 (Python 3.9.5).

I haven't found much information on the Internet about this issue...

Roberto Jobet
  • 153
  • 4
  • 15
  • 3
    How much more of explicit error message are you looking for? They have really gone all out about saying "your playbook is using the wrong copy of python, and here is the var name that will cure it". – mdaniel Nov 14 '21 at 22:55

1 Answers1

0

Found the culprit... Debian (and Ubuntu) packages for ansible used to rely on python2 and that is why it will not use python3 libraries....

In fact I installed ansible using the apt install ansible command

Roberto Jobet
  • 153
  • 4
  • 15