Giter Club home page Giter Club logo

ansible-keepass's Introduction

Hi there ๐Ÿ‘‹

I am Nekmo and I'm a Python & Typescript developer. I develop open source projects for the community. You can see my projects on my Github profile.

pgp twitter


ansible-keepass's People

Contributors

lpirl avatar nekmo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ansible-keepass's Issues

What is the password cache actually good for?

First, thank you very much for this nice plugin.

I was about to replace your implementation of the password cache with lru_cache of functools for readability.

However, I recognized that get_password gets called for every task in a Play.

Some good old printf debugging (print(self.identity, host_name) to get_password) gave me:

TASK [Gathering Facts] *************************************************

<ansible.plugins.vars.ansible_keepass.KeepassXC object at 0x7f8d3f0ff150> myhost

ok: [myhost]

TASK [foo] *************************************************************

<ansible.plugins.vars.ansible_keepass.KeepassXC object at 0x7f8d3f0ff150> myhost

ok: [myhost]

TASK [bar] *************************************************************

<ansible.plugins.vars.ansible_keepass.KeepassXC object at 0x7f8d3f0ff150> myhost

ok: [myhost]

TASK [baz] *************************************************************

<ansible.plugins.vars.ansible_keepass.KeepassXC object at 0x7f8d3f0ff150> myhost

ok: [myhost]


So I was asking myself โ€“ what is the password cache actually good for? When can it actually be reused?

Cheers :)

KeepassXC url format missing `//`

When I tried to make the plugin work I never found an entry, so I debugged the code and saw that under KeepassXC you are not looking for ssh://[host] but for ssh:[host]. This might be a typo but changing the following worked for me

def get_password(self, host_name):
        try:
            logins = self.connection.get_logins(
                self.identity,
                url='ssh://{}'.format(host_name)

On a side note, entering the URL values with just ssh:[host] is marked red in KeepassXC, indicating that the URL is not correct

Why are we monkey patching ``TaskExecutor`` instead of providing a proper ``VarsModule``?

Is there anything (apart from checking become) why monkey patching TaskExecutor is a superior solution to just writing a VarsModule?

IMHO the present approach torpedoes the idea of "vars plugins" (and the Law of Demeter).

In order to gain readability and comprehensibility (which is surely is subjective) for investigating #4, a refactored version of your wonderful plugin resulted. In this refactored version, you can find an example implementation as a "vars plugin".

The refactored version also contains the changes I pull-requested (plus: it moves all functions out the scope of the module, fixes to be more compliant with PEP 8, etc.).

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.