Skip to content
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

field_info module: Change the flatten_fields_by_label default to false #54

Open
verkaufer opened this issue Jan 19, 2022 · 0 comments
Open
Labels
tracked Issue is tracked in 1Password's internal ticketing system as well.
Milestone

Comments

@verkaufer
Copy link
Member

As noted in the release notes for v2.2.0, the flatten_fields_by_label option should default to false beginning with the next major version.

What this means

The fields key in the returned op_item dictionary will return a list instead of a nested dictionary. Fields with identical labels will not be de-duplicated. Users can opt to keep the behavior by setting the flatten_fields_by_label argument to yes

Example:

---
# Omitting `flatten_fields_by_label` => the `fields` key is a dict, non-unique field labels may overwrite each other
- name: Find and return Item details for "Dev-Database" 
  onepassword.connect.item_info:
    item: Dev-Database
    vault: 2zbeu4smcibizsuxmyvhdh57b6

# Set `flatten_fields_by_label` to false => fields are returned as a list, duplicate labels not removed
- name: Find and return Item details for "Dev-Database" - not flattened
  onepassword.connect.item_info:
    item: Dev-Database
    vault: 2zbeu4smcibizsuxmyvhdh57b6
    flatten_fields_by_label: false
@verkaufer verkaufer added this to the 3.0.0 milestone Jan 19, 2022
@edif2008 edif2008 changed the title field_info module: Change the flatten_fields_by_label default to false [5] field_info module: Change the flatten_fields_by_label default to false Feb 8, 2022
@edif2008 edif2008 added the tracked Issue is tracked in 1Password's internal ticketing system as well. label May 30, 2022
@edif2008 edif2008 changed the title [5] field_info module: Change the flatten_fields_by_label default to false field_info module: Change the flatten_fields_by_label default to false May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tracked Issue is tracked in 1Password's internal ticketing system as well.
Projects
None yet
Development

No branches or pull requests

2 participants