Skip to content

Recover the attachment contents directly #49

Description

@killerrex

Hi,

I am using this plugin to keep all the user information (passwords, ssh keys...) centralised in a kdbx file and is working great.

The only issue I found is with the attachments, that as they are extracted in a temporal local file it is complex to transfer them between hosts.

As normally all the attachments I have are small plain text files, I have done a modification that allows to recover the content of the attachment directly in the variable like:

  vars:
    content: "{{ lookup('viczem.keepass.keepass', 'example/pork', 'content', 'test.txt')}}"
  task:
    - debug:
        msg: "Content of the file is {{ content }}"

so there are no temporal files created anyplace.

If you think it is useful I can do a PR from my fork
I do not know if it can be useful to add the capacity to specify the encoding or return raw bytes...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions