From: "DiDomenico, Michael (ARC-TNC)[InuTeq, LLC]" <michael.didomen...@nasa.gov> Date: Friday, July 22, 2022 at 2:22 PM To: "ansible-proj...@googlegroups.com" <ansible-proj...@googlegroups.com> Subject: python error during task
i have compiled a separate version of openssl 1.1.1, python 3.10.5, and ansible 2.13.2 into my home directory. i have the interpreter_python set in the ansible.cfg file to point to the version of python in my home directory. on some hosts my playbook runs okay, but on others i'm getting the below error. what i think the problem is, is that python is finding modules in the 2.7 system libs on particular hosts and not others. on the hosts that work i'm guessing python isn't picking up the 2.7 system lib versions i'm new to ansible and python, so i'm not sure where the error lies. i'm hedging a bet, it's in the way i compiled python in my home directory. it happened when i pip installed ansible with my custom python. but i'm not sure which or how exactly to debug this dependency issue TASK [install ntpd if missing] ********************************************************************************************************************************************************************************** task path: /home1/user/ansible_ccm/playbooks/ntpd/main.yml:15 Friday 22 July 2022 11:10:46 -0700 (0:00:01.705) 0:00:01.731 *********** Friday 22 July 2022 11:10:46 -0700 (0:00:01.706) 0:00:01.730 *********** Running ansible.legacy.yum Using module file /u/user/ansible/lib/python3.10/site-packages/ansible/modules/yum.py Pipelining is enabled. <host1> ESTABLISH LOCAL CONNECTION FOR USER: root <host1> EXEC /bin/sh -c 'PYTHONPATH=/u/user/ansible/lib/python3.10/site-packages/:/u/mdidome1/ansible/lib64/python3.10/site-packages/ LD_LIBRARY_PATH=/u/user/ansible/lib:/u/user/ansible/lib64 /u/user/ansible/bin/python3.10 && sleep 0' The full traceback is: Traceback (most recent call last): File "<stdin>", line 16, in <module> File "/usr/lib64/python2.7/runpy.py", line 176, in run_module fname, loader, pkg_name) File "/usr/lib64/python2.7/runpy.py", line 82, in _run_module_code mod_name, mod_fname, mod_loader, pkg_name) File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/tmp/ansible_ansible.legacy.yum_payload_aa9h7s_4/ansible_ansible.legacy.yum_payload.zip/ansible/modules/yum.py", line 405, in <module> File "/tmp/ansible_ansible.legacy.yum_payload_aa9h7s_4/ansible_ansible.legacy.yum_payload.zip/ansible/module_utils/urls.py", line 116, in <module> File "/usr/lib/python2.7/site-packages/urllib3/contrib/pyopenssl.py", line 46, in <module> import OpenSSL.SSL File "/usr/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module> from OpenSSL import rand, crypto, SSL File "/usr/lib/python2.7/site-packages/OpenSSL/rand.py", line 12, in <module> from OpenSSL._util import ( File "/usr/lib/python2.7/site-packages/OpenSSL/_util.py", line 6, in <module> from cryptography.hazmat.bindings.openssl.binding import Binding File "/u/user/ansible/lib/python3.10/site-packages/cryptography/__init__.py", line 13, in <module> from cryptography.utils import CryptographyDeprecationWarning File "/u/user/ansible/lib/python3.10/site-packages/cryptography/utils.py", line 30 def _check_bytes(name: str, value: bytes) -> None: ^ SyntaxError: invalid syntax -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/18EE50D1-15A5-4A56-AA16-A4366F462448%40nasa.gov.