ansible-onepasswordconnect-collection
ansible-onepasswordconnect-collection copied to clipboard
Use a valid Client UUID when creating new sections
Summary
If the generic_item
module needs to create a new section, the collection should create a valid 1Password client UUID instead of the standard UUIDv4.
Use cases
This is a compatibility fix to ensure the changes for field & item lookup can use section IDs instead of labels for lookups.
Additionally, if a user was to provide a UUIDv4 for "section" when trying to find a field or item, the lookup would fail because the UUIDv4 is neither a section label or a valid client UUID.
Proposed solution
We introduced create_client_uuid
in PR #39 , but did not edit the vault.assemble_item()
function to use it when creating a new section.
We need to be careful making this change to confirm there aren't regressions for users.
In the worst case scenario, a user upgrades the collection to the version with this change and then runs their playbook with a generic_item
task. If the item is unchanged, they would expect the item to not send an update to the Connect server.
Is there a workaround to accomplish this today?
No
References & Prior Work
n/a