Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix returnall for gopass
Gopass was always given the --password flag, despite there being no need for this.
  • Loading branch information
Sylvia van Os committed Jul 29, 2022
commit 4bc6f0a91016f3b6c15af93839c5e2f34d5b77fc
5 changes: 2 additions & 3 deletions plugins/lookup/passwordstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,11 @@ def __init__(self, loader=None, templar=None, **kwargs):
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)

Expand Down Expand Up @@ -331,7 +331,6 @@ def check_pass(self):
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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,6 @@
if [ "$1" = "--version" ]; then
exit 2
fi
if [ "$1" = "show" ] && [ "$2" != "--password" ]; then
exit 3
fi
echo "gopass_ok"
dest: "{{ gopasspath }}"
mode: '0755'
Expand Down