mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 03:00:23 -07:00
Fix returnall for gopass (#5027)
* Fix returnall for gopass Gopass was always given the --password flag, despite there being no need for this. * Add changelog fragment Co-authored-by: Sylvia van Os <sylvia.van.os@politie.nl>
This commit is contained in:
parent
c64dd16f1c
commit
3eb29eb4b6
3 changed files with 4 additions and 6 deletions
|
@ -261,11 +261,11 @@ class LookupModule(LookupBase):
|
|||
def is_real_pass(self):
|
||||
if self.realpass is None:
|
||||
try:
|
||||
self.passoutput = to_text(
|
||||
passoutput = to_text(
|
||||
check_output2([self.pass_cmd, "--version"], env=self.env),
|
||||
errors='surrogate_or_strict'
|
||||
)
|
||||
self.realpass = 'pass: the standard unix password manager' in self.passoutput
|
||||
self.realpass = 'pass: the standard unix password manager' in passoutput
|
||||
except (subprocess.CalledProcessError) as e:
|
||||
raise AnsibleError(e)
|
||||
|
||||
|
@ -331,7 +331,6 @@ class LookupModule(LookupBase):
|
|||
try:
|
||||
self.passoutput = to_text(
|
||||
check_output2([self.pass_cmd, 'show'] +
|
||||
(['--password'] if self.backend == 'gopass' else []) +
|
||||
[self.passname], env=self.env),
|
||||
errors='surrogate_or_strict'
|
||||
).splitlines()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue