Fix linting. Fix collection structure
This commit is contained in:
parent
da0e5f125c
commit
e57cd7b6b1
|
@ -15,7 +15,7 @@ The UNIX socket file is stored in a temporary folder according to OS.
|
||||||
Requirements: `python 3`, `pykeepass==4.0.3`
|
Requirements: `python 3`, `pykeepass==4.0.3`
|
||||||
|
|
||||||
pip install 'pykeepass==4.0.3' --user
|
pip install 'pykeepass==4.0.3' --user
|
||||||
ansible-galaxy install viczem.keepass
|
ansible-galaxy collection install viczem.keepass
|
||||||
|
|
||||||
|
|
||||||
## Variables
|
## Variables
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
requires_ansible: ">=2.10"
|
||||||
|
|
|
@ -40,7 +40,7 @@ DOCUMENTATION = """
|
||||||
examples:
|
examples:
|
||||||
- "{{ lookup('keepass', 'path/to/entry', 'username') }}"
|
- "{{ lookup('keepass', 'path/to/entry', 'username') }}"
|
||||||
- "{{ lookup('keepass', 'path/to/entry', 'password') }}"
|
- "{{ lookup('keepass', 'path/to/entry', 'password') }}"
|
||||||
- "{{ lookup('keepass', 'path/to/entry', 'custom_properties', 'a_custom_property_name') }}"
|
- "{{ lookup('keepass', 'path/to/entry', 'custom_properties', 'my_prop_name') }}"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ def _keepass_socket(kdbx, kdbx_key, sock_path, ttl=60, kdbx_password=None):
|
||||||
|
|
||||||
if entry is None:
|
if entry is None:
|
||||||
conn.send(
|
conn.send(
|
||||||
_resp("fetch", 1, "path '%s' is not found".format(path))
|
_resp("fetch", 1, "path '%s' is not found" % path)
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
|
|
||||||
|
@ -281,8 +281,7 @@ def _keepass_socket(kdbx, kdbx_key, sock_path, ttl=60, kdbx_password=None):
|
||||||
_resp(
|
_resp(
|
||||||
"fetch",
|
"fetch",
|
||||||
1,
|
1,
|
||||||
"custom_property key is not set "
|
"no custom_property key for '%s'" % arg[0],
|
||||||
"for '%s'".format(arg[0]),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
|
@ -293,8 +292,8 @@ def _keepass_socket(kdbx, kdbx_key, sock_path, ttl=60, kdbx_password=None):
|
||||||
_resp(
|
_resp(
|
||||||
"fetch",
|
"fetch",
|
||||||
1,
|
1,
|
||||||
"custom_property '%s' is not found "
|
"custom_property '%s' is not found for '%s'"
|
||||||
"for '%s'".format(prop_key, path),
|
"" % (prop_key, path),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
|
@ -312,7 +311,7 @@ def _keepass_socket(kdbx, kdbx_key, sock_path, ttl=60, kdbx_password=None):
|
||||||
_resp(
|
_resp(
|
||||||
"fetch",
|
"fetch",
|
||||||
1,
|
1,
|
||||||
"unknown property '%s' for '%s'".format(prop, path),
|
"unknown property '%s' for '%s'" % (prop, path),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue