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

onepassword - Get first found config file #4640

Merged

Conversation

samdoran
Copy link
Contributor

@samdoran samdoran commented May 6, 2022

SUMMARY

Fixes #4065.

There are three configuration file locations. Use the first found valid config.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

plugins/lookup/onepassword.py
plugins/module_utils/onepassword.py
plugins/modules/identity/onepassword_info.py

ADDITIONAL INFORMATION

This plugin is currently broken since the 1Password v2 CLI was released. More work is needed to address that issue, but this is a first step.

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug identity lookup lookup plugin module module module_utils module_utils plugins plugin (any type) labels May 6, 2022
@samdoran samdoran changed the title [onepassword] - Get first found config file onepassword - Get first found config file May 7, 2022
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Could you please add a changelog fragment?

plugins/lookup/onepassword.py Outdated Show resolved Hide resolved
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-3 labels May 8, 2022
samdoran added 2 commits May 8, 2022 20:44
This shouldn’t matter for lookups, but does matter for module_utils
and modules since Python 2.7 is still supported on the managed node.
@felixfontein felixfontein merged commit 9e1af2d into ansible-collections:main May 9, 2022
@patchback
Copy link

patchback bot commented May 9, 2022

Backport to stable-3: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-3/9e1af2d1bce7b30995b46a2fa2992a054c507e3a/pr-4640

Backported as #4652

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein
Copy link
Collaborator

@samdoran thanks a lot for fixing this!

patchback bot pushed a commit that referenced this pull request May 9, 2022
* Get first found configuration file

There are three valid places to get the configuration.

https://developer.1password.com/docs/cli/about-biometric-unlock#remove-old-account-information

* Use common config class

* Add changelog fragment

* Explicitly use new style classes for Python 2.7 compatibility

This shouldn’t matter for lookups, but does matter for module_utils
and modules since Python 2.7 is still supported on the managed node.

* Update changelogs/fragments/4065-onepassword-config.yml

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit 9e1af2d)
@patchback
Copy link

patchback bot commented May 9, 2022

Backport to stable-4: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-4/9e1af2d1bce7b30995b46a2fa2992a054c507e3a/pr-4640

Backported as #4653

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request May 9, 2022
* Get first found configuration file

There are three valid places to get the configuration.

https://developer.1password.com/docs/cli/about-biometric-unlock#remove-old-account-information

* Use common config class

* Add changelog fragment

* Explicitly use new style classes for Python 2.7 compatibility

This shouldn’t matter for lookups, but does matter for module_utils
and modules since Python 2.7 is still supported on the managed node.

* Update changelogs/fragments/4065-onepassword-config.yml

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit 9e1af2d)
@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label May 9, 2022
felixfontein pushed a commit that referenced this pull request May 9, 2022
* Get first found configuration file

There are three valid places to get the configuration.

https://developer.1password.com/docs/cli/about-biometric-unlock#remove-old-account-information

* Use common config class

* Add changelog fragment

* Explicitly use new style classes for Python 2.7 compatibility

This shouldn’t matter for lookups, but does matter for module_utils
and modules since Python 2.7 is still supported on the managed node.

* Update changelogs/fragments/4065-onepassword-config.yml

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit 9e1af2d)

Co-authored-by: Sam Doran <[email protected]>
felixfontein pushed a commit that referenced this pull request May 9, 2022
* Get first found configuration file

There are three valid places to get the configuration.

https://developer.1password.com/docs/cli/about-biometric-unlock#remove-old-account-information

* Use common config class

* Add changelog fragment

* Explicitly use new style classes for Python 2.7 compatibility

This shouldn’t matter for lookups, but does matter for module_utils
and modules since Python 2.7 is still supported on the managed node.

* Update changelogs/fragments/4065-onepassword-config.yml

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit 9e1af2d)

Co-authored-by: Sam Doran <[email protected]>
@samdoran samdoran deleted the issue/4065-1p-config branch May 9, 2022 13:44
@samdoran
Copy link
Contributor Author

samdoran commented May 9, 2022

Thanks @felixfontein!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug identity lookup lookup plugin module_utils module_utils module module plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1Password lookup uses invalid config
3 participants