Nekmo / ansible-keepass

Use become (sudo) in Ansible without giving any password and safely
25 stars 5 forks source link

KeepassXC url format missing `//` #10

Open select opened 3 years ago

select commented 3 years ago

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

peterbabic commented 3 years ago

What is more interesting is that other part of the code has it like that with ssh:// https://github.com/Nekmo/ansible-keepass/blob/52be41a1f4927cb3302060849098323c85b00703/ansible_keepass.py#L82-L86