-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
onepassword_raw; V2 (general 6.0.0); domain was not defined in configuration. #5506
Comments
Files identified in the description: If these files are incorrect, please update the |
Tagging @samdoran |
I just quick-tested using community.general.onepassword.py and this works for a specific query. |
!component =plugins/lookup/onepassword_raw.py |
Files identified in the description: If these files are incorrect, please update the |
I'll have a fix up shortly. |
@samdoran Thank you so much. Initial tests look good. However, it seems the output has changed a bit from V1, so I'll need to re-craft the parsing methodology, from the raw plugin. |
Yes, the v2 schema is quite a bit different but I think it's a bit more coherent and easier to parse. |
Summary
Hi.
I have just upgraded to General 6.0.0 which includes support for 1Password V2.
The same Ansible configuration from v1 throws:
"An unhandled exception occurred while running the lookup plugin 'community.general.onepassword_raw'. Error was a <class 'KeyError'>, original message: 'Requested entry (plugin_type: lookup plugin: ansible_collections.community.general.plugins.lookup.onepassword_raw setting: domain ) was not defined in configuration.'. 'Requested entry (plugin_type: lookup plugin: ansible_collections.community.general.plugins.lookup.onepassword_raw setting: domain ) was not defined in configuration.'"
Issue Type
Bug Report
Component Name
community/general/plugins/lookup/onepassword_raw.py
Ansible Version
$ ansible --version
ansible [core 2.13.5]
...
python version = 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]
jinja version = 3.1.2
libyaml = True
Community.general Version
$ ansible-galaxy collection list community.general
community.general 6.0.0
Configuration
$ ansible-config dump --only-changed
vars:
record: "my_record"
vault: "my_vault"
tasks:
onepassword_items: "{{ lookup('community.general.onepassword_raw', record, vault=vault) | default({}, true) }}"
msg: "{{ onepassword_items }}"
OS / Environment
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal
Steps to Reproduce
eval $(op signin)
ansible-playbook my_playbook.yml
Expected Results
I expect the contents of the record in the vault to display.
Actual Results
"An unhandled exception occurred while running the lookup plugin 'community.general.onepassword_raw'. Error was a <class 'KeyError'>, original message: 'Requested entry (plugin_type: lookup plugin: ansible_collections.community.general.plugins.lookup.onepassword_raw setting: domain ) was not defined in configuration.'. 'Requested entry (plugin_type: lookup plugin: ansible_collections.community.general.plugins.lookup.onepassword_raw setting: domain ) was not defined in configuration.'"
Code of Conduct
The text was updated successfully, but these errors were encountered: