Skip to content

Commit

Permalink
[PR #5942/5648e0e2 backport][stable-6] onepassword: ignore errors fro…
Browse files Browse the repository at this point in the history
…m "op account get" (#6037)

onepassword: ignore errors from "op account get" (#5942)

* ignore errors from "op account get"

* add changelog fragment

* Update changelogs/fragments/5942-onepassword-ignore-errors-from-op-account-get.yml

Co-authored-by: Felix Fontein <[email protected]>

---------

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

Co-authored-by: Glenn Marcy <[email protected]>
  • Loading branch information
patchback[bot] and gmarcy authored Feb 22, 2023
1 parent 3ecbadf commit 1fc53ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- onepassword lookup plugin - Changed to ignore errors from "op account get" calls. Previously, errors would prevent auto-signin code from executing (https://github.com/ansible-collections/community.general/pull/5942).
2 changes: 1 addition & 1 deletion plugins/lookup/onepassword.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ def assert_logged_in(self):
account = "{subdomain}.{domain}".format(subdomain=self.subdomain, domain=self.domain)
args.extend(["--account", account])

rc, out, err = self._run(args)
rc, out, err = self._run(args, ignore_errors=True)

return not bool(rc)

Expand Down

0 comments on commit 1fc53ee

Please sign in to comment.