viczem / ansible-keepass

Ansible lookup plugin to fetch data from KeePass file
MIT License
113 stars 31 forks source link

Plugin does not suppport lookup of properties/attributes with several lines #28

Closed lfvjimisola closed 2 years ago

lfvjimisola commented 2 years ago

The lookup of a property with several (multi) lines is an empty string.

It works with pykeepass in interpreter.

lfvjimisola commented 2 years ago

Thank you for the fast reply and fix!

May I ask if there are any plans of supporting attachments? That it, save an attachment in KeePass to disk.

Understand that it quite certainly can't be part of the lookup but maybe as a task (own module)? With the ansible-galaxy fix it might not be to much work?

viczem commented 2 years ago

I think it is simply to add a possibility for reading attachments to variables. But what use case? We can continue to discuss it by email

lfvjimisola commented 2 years ago

I think it is simply to add a possibility for reading attachments to variables. But what use case? We can continue to discuss it by email

The problem is when the file in binary and also how large can variables be?

Email or that we create another issue?

viczem commented 2 years ago

Variables are stored a data in memory, therefore should be dependent on RAM.

Perhaps I do not fully understand your idea, I can assume that you want to have an encrypted binary file. You can encrypt a file with standard Ansible tools and decrypt it when you need - https://docs.ansible.com/ansible/latest/user_guide/vault.html#using-encrypted-variables-and-files.

I've never done this before, I hope this helps you

lfvjimisola commented 2 years ago

Yes, in theory unless Ansible has made any restrictions themselves. But, I haven't found any (link).

That said, I've written a module for writing attachments to file system (see #29)