diff --git a/changelogs/fragments/5942-onepassword-ignore-errors-from-op-account-get.yml b/changelogs/fragments/5942-onepassword-ignore-errors-from-op-account-get.yml new file mode 100644 index 0000000000..e6b774dd35 --- /dev/null +++ b/changelogs/fragments/5942-onepassword-ignore-errors-from-op-account-get.yml @@ -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). diff --git a/plugins/lookup/onepassword.py b/plugins/lookup/onepassword.py index 5e9549c2b7..0e78e4b1a0 100644 --- a/plugins/lookup/onepassword.py +++ b/plugins/lookup/onepassword.py @@ -488,7 +488,7 @@ class OnePassCLIv2(OnePassCLIBase): 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)