Comments (5)
Please create PR, I'll add your module to collection
from ansible-keepass.
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.
@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):
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
- 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.
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.
@dangoncalves Thank you for the gist!
Regarding the wrong directory, this viczem.keepass collection has doc
while 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)
- Entry <name> not found HOT 2
- python-pykeepass 4.0.0 HOT 2
- global name 'FileNotFoundError' HOT 1
- FileNotFoundError: [Errno 2] No such file or directory: '/tmp/ansible-keepass-6d5c20be.sock' HOT 20
- Plugin does not suppport lookup of properties/attributes with several lines HOT 5
- Password shall not be mandatory for opening the db
- KeePass: socket connection failed when used in parallel HOT 2
- backslashes are being escaped in password HOT 2
- Concurrent access on testing socket file and creating associated process HOT 7
- Using a kbdx over https HOT 1
- Socket location HOT 2
- Temp files should be in tmpfs HOT 4
- Support for database editting HOT 3
- Implementation as cache plugin HOT 6
- Unable to get attachments HOT 1
- custom_properties - long chain are truncated
- Search for DB entry by title/url + regex HOT 4
- Recover the attachment contents directly HOT 1
- python-pykeepass v4.0.7 - No module named 'pykeepass.kdbx_parsing'" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-keepass.