Git Product home page Git Product logo

Comments (5)

viczem avatar viczem commented on August 19, 2024

Please create PR, I'll add your module to collection

from ansible-keepass.

dangoncalves avatar dangoncalves commented on August 19, 2024

No need to write an extra module to access attached files. #30 aims to do that from the actual lookup plugin: files are retrieved from keepass entries and copied to temp files that are deleted when socket closes. (more doc on how using this feature will be added if you are interested).

Of course, if you need a permanent storage, your module could be useful.

from ansible-keepass.

jimisola avatar jimisola commented on August 19, 2024

@dangoncalves That's nice. I'll provide my module for @viczem to do what he wants with it.

May I ask for some help regarding development of the collection or even better a few lines in the README.md for contributors?

I forked the repo, did a git clone, placed and updated the attachment.py under plugin. I've set COLLECTIONS_PATH (correct?):

jimisola@turing:~/cloud/dev/opensource/ansible_collections/viczem/keepass (feature/attachment_to_file)$ echo $COLLECTIONS_PATHS 
/home/jimisola/cloud/dev/opensource:/home/jimisola/.ansible/collections:/usr/share/ansible/collections

and ran ansible-test sanity checks (here).

How do I (without installing the collection):

  1. ansible-doc -t lookup keepass
jimisola@turing:~/cloud/dev/opensource/ansible_collections/viczem/keepass (feature/attachment_to_file)$ ansible-doc -t lookup keepass
[WARNING]: lookup keepass not found in: /home/jimisola/.ansible/plugins/lookup:/usr/share/ansible/plugins/lookup:/usr/lib/python3/dist-
packages/ansible/plugins/lookup
  1. Run the example in doc/examples/example-playbook.yml? Tried different variants. But, since the collection is not installed it isn't found by ansible. --collections-path does not seem to work either.
jimisola@turing:~/cloud/dev/opensource/ansible_collections/viczem/keepass (feature/attachment_to_file)$ ansible-playbook doc/examples/example-playbook.yml --ask-vault-pass
Vault password: 
...
fatal: [127.0.0.1]: FAILED! => {"msg": "An unhandled exception occurred while templating '{{ lookup('viczem.keepass.keepass', 'spam', 'username') }}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: lookup plugin (viczem.keepass.keepass) not found"}

Finally, I've noticed that there are some typos, wrong directory names, use of "plugin" instead of "collection" etc. I'll create a PR for that as well.

from ansible-keepass.

dangoncalves avatar dangoncalves commented on August 19, 2024

Hello,

I just made a gist to help you installing the collection for dev purpose.

The collection works and directories names are correct see this example

from ansible-keepass.

jimisola avatar jimisola commented on August 19, 2024

@dangoncalves Thank you for the gist!

Regarding the wrong directory, this viczem.keepass collection has docwhile the official documentation and your provided example uses [docs](https://docs.ansible.com/ansible/latest/dev_guide/developing_collections_structure.html#docs-directory) (trailing 's'). I believe that those should be the same. Or perhaps it does not matter?

from ansible-keepass.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.