-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
community.general.keyring import keyring FAILED! #1
Comments
Could it be an issue with python paths / different versions of python installed on macOS? |
Do 'python3' and 'sudo python3' call the same python 3 packages? |
Tested community.general.keyring on a pure linux setup and it worked like a charm! So it's a macOS / python / |
When testet on another mac - it worked too! |
Installed python3 from python.org on top of the brew version the python.org on macOS on the Mac with problems and it some how worked. Added export PATH="/Library/Frameworks/Python.framework/Versions/3.9/bin:${PATH}" to my zsh profile. But I am still not entirely sure why macOS needs the python3 version from python.org in order to work properly with import statements from python libs in ansible. |
I ran into this issue and sort of got past it by adding the following to my playbook before I use - ansible.builtin.pip:
executable: /opt/homebrew/opt/ansible/libexec/bin/pip3
name: keyring
state: latest However now I get this error when I'm trying to use it in ansible: This is how I'm invoking it: - ansible.builtin.set_fact:
example_pw: "{{ pw_input or lookup('keyring', 'example user') }}" |
Invoking the /opt/homebrew/opt/ansible/libexec/bin/keyring get example user |
fatal: [localhost]: FAILED! => {"msg": "An unhandled exception occurred while running the lookup plugin 'community.general.keyring'. Error was a <class 'ansible.errors.AnsibleError'>, original message: Can't LOOKUP(keyring): missing required python library 'keyring'"}
Even when keyring is correctly installed ansible cannot reference the python keyring library with 'import keyring' from inside community.general.keyring. It seems that ansible has problems with python libraries installed outside of the ansible context.
The text was updated successfully, but these errors were encountered: