1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/plugins/lookup
patchback[bot] 3d2caf3933
passwordstore: Add configurable locking (#4194) (#4243)
* passwordstore: Add configurable locking

Passwordstore cannot be accessed safely in parallel, which causes
various issues:

- When accessing the same path, multiple different secrets are
  returned when the secret didn't exist (missing=create).
- When accessing the same _or different_ paths, multiple pinentry
  dialogs will be spawned by gpg-agent sequentially, having to enter
  the password for the same gpg key multiple times in a row.
- Due to issues in gpg dependencies, accessing gpg-agent in parallel
  is not reliable, causing plays to fail (this can be fixed by adding
  `auto-expand-secmem` to _~/.gnupg/gpg-agent.conf_ though).

These problems have been described in various github issues in the past,
e.g., ansible/ansible#23816 and ansible/ansible#27277.

This cannot be worked around in playbooks by users in a non-error-prone
way.

It is addressed by adding new configuration options:

- lock:
  - readwrite: Lock all operations
  - write: Only lock write operations (default)
  - none: Disable locking
- locktimeout: Time to wait for getting a lock (s/m/h suffix)
  (defaults to 15m)

These options can also be set in ansible.cfg, e.g.:

    [passwordstore_lookup]
    lock=readwrite
    locktimeout=30s

Also, add a note about modifying gpg-agent.conf.

* Tidy up locking config

There is no reason why lock configuration should be part of self.paramvals.
Now locking and its configuration happen all in one place.

* Change timeout description wording to the suggested value.

* Rearrange plugin setup, apply PR feedback

(cherry picked from commit 2416b81aa4)

Co-authored-by: grembo <freebsd@grem.de>
2022-02-21 21:37:47 +01:00
..
cartesian.py fixed the utf-8 marker (#3162) 2021-08-07 15:02:21 +02:00
chef_databag.py fixed the utf-8 marker (#3162) 2021-08-07 15:02:21 +02:00
collection_version.py Add collection_version lookup (#3633) 2021-11-01 19:01:52 +01:00
consul_kv.py fixed the utf-8 marker (#3162) 2021-08-07 15:02:21 +02:00
credstash.py fixed the utf-8 marker (#3162) 2021-08-07 15:02:21 +02:00
cyberarkpassword.py fixed the utf-8 marker (#3162) 2021-08-07 15:02:21 +02:00
dependent.py fixed the utf-8 marker (#3162) 2021-08-07 15:02:21 +02:00
dig.py Add option for retry_servfail (#3247) 2021-08-21 21:57:28 +02:00
dnstxt.py fixed the utf-8 marker (#3162) 2021-08-07 15:02:21 +02:00
dsv.py <plugin_type>: -> name: (#1541) 2021-01-12 07:12:03 +01:00
etcd.py fixed the utf-8 marker (#3162) 2021-08-07 15:02:21 +02:00
etcd3.py Docs improvements. (#3893) (#3894) 2021-12-12 11:46:31 +01:00
filetree.py fixed the utf-8 marker (#3162) 2021-08-07 15:02:21 +02:00
flattened.py Fix example code for flattened lookup (#4013) (#4016) 2022-01-09 12:29:22 +01:00
hiera.py fixed the utf-8 marker (#3162) 2021-08-07 15:02:21 +02:00
keyring.py fixed the utf-8 marker (#3162) 2021-08-07 15:02:21 +02:00
lastpass.py fixed the utf-8 marker (#3162) 2021-08-07 15:02:21 +02:00
lmdb_kv.py fixed the utf-8 marker (#3162) 2021-08-07 15:02:21 +02:00
manifold.py fixed the utf-8 marker (#3162) 2021-08-07 15:02:21 +02:00
onepassword.py Replace ansible.module_utils._text by ansible.module_utils.common.text.converters (#2877) 2021-06-26 23:59:11 +02:00
onepassword_raw.py <plugin_type>: -> name: (#1541) 2021-01-12 07:12:03 +01:00
passwordstore.py passwordstore: Add configurable locking (#4194) (#4243) 2022-02-21 21:37:47 +01:00
random_pet.py random_pet: Random pet name generator (#2479) 2021-05-14 10:55:27 +02:00
random_string.py Replace ansible.module_utils._text by ansible.module_utils.common.text.converters (#2877) 2021-06-26 23:59:11 +02:00
random_words.py add random_words lookup plugin, based on the xkcdpass module (#3588) 2021-10-27 22:37:28 +02:00
redis.py fixed the utf-8 marker (#3162) 2021-08-07 15:02:21 +02:00
revbitspss.py RevBits PAM Secret Server Plugin (#3405) (#3771) 2021-11-22 19:26:48 +01:00
shelvefile.py fixed the utf-8 marker (#3162) 2021-08-07 15:02:21 +02:00
tss.py tss: add option for token authorization (#3327) 2021-09-14 13:34:59 +02:00