Closed yoshikakbudto closed 1 year ago
The role only has been tested for Ubuntu 20.04. Other releases of Ubuntu or other OS are not currently supported Role should be tested and updated to use Debian distributions.
python-is-python3
packageFrom: https://packages.debian.org/bullseye/python-is-python3
"Starting with the Debian 11 (bullseye) and Ubuntu 20.04 LTS (focal) releases, all python packages use explicit python3 or python2 interpreter and do not use unversioned /usr/bin/python at all.
python-is-python3
is is a convenience package which ships a symlink to point the /usr/bin/python interpreter at the current default python3"
This is needed by the minio python module (minio_buckert.py
) which makes uses of /usr/bin/python
interpreter.
Ansible's automatic python interpreter discovery should select the proper interpreter installed in the server and use it with any module that is executed.
But for this to work the python module must start by #!/usr/bin/python
and if the python script starts with #!/usr/bin/env python
automatic interpreter replacement is not working. See Ansible's module development documentation, where it is stated that:
Begin your Ansible module with #!/usr/bin/python - this “shebang” allows ansible_pythoninterpreter to work. Follow the shebang immediately with # -- coding: utf-8 -- to clarify that the file is UTF-8 encoded. Using #!/usr/bin/env, makes env the interpreter and bypasses ansible
_interpreter logic.
Changing the shebang in the python script removes the need for python-is-python3
package.
I've got the error installing minio client on this system:
PRETTY_NAME="Debian GNU/Linux 10 (buster)" NAME="Debian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster