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

backslashes are being escaped in password #35

Closed
ClementJ35 opened this issue Nov 23, 2022 · 2 comments
Closed

backslashes are being escaped in password #35

ClementJ35 opened this issue Nov 23, 2022 · 2 comments

Comments

@ClementJ35
Copy link

Hi,

I'm using this lookup and when I have backslashes, they are automatically escaped when looked up.
Example :

In keepass, I have a slashes-password entry with password : foo\bar\

When I'm looking up with ansible, it comes with escaped backslashes :

TASK [debug] ********************************
ok: [localhost] => {
    "lookup('viczem.keepass.keepass', 'slashes-debug', 'password')": "foo\\bar\\"
}

It seems that the only character being escaped automatically. I tried a lot of filters but no matter what, every time it comes out with backslashes.

@ClementJ35
Copy link
Author

ClementJ35 commented Nov 24, 2022

Coming back with further test, it seems that baskslashes are escaped by json renderer. If I ask yaml rendering, I 've got my variable without backslashes escaped :

$ export ANSIBLE_STDOUT_CALLBACK=yaml
...
TASK [debug] ****************************************
ok: [localhost] => 
  lookup('viczem.keepass.keepass', 'slashes-debug', 'password'): foo\bar\

@ClementJ35
Copy link
Author

My bad,
It's definitely not an issue from this lookup plugin.
Closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant