From a9b91ea2451fdb7f95635ee07b22e37287ac980a Mon Sep 17 00:00:00 2001 From: Matt Stofko Date: Thu, 5 Jul 2018 18:03:11 -0700 Subject: [PATCH] Lookup plugin info and usage --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 4cba9ab..0a98037 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,18 @@ # ansible-modules-bitwarden + Bitwarden integrations for Ansible + +## Lookup plugin + +Use `lookup()` with the `bitwarden` argument, followed by the items you want to retreive. The default field is `password`, but any other field can be specified. If you need to specify the path to the bitwarden CLI binary, use the `path` named argument. For example: + +```yaml +# Get username for Slashdot and Google +- debug: msg="{{ lookup('bitwarden', 'Slashdot', 'Google', field='username', path='/not/in/my/path/bw') }}" +``` + +If you want to run the plugin directly for testing, you must first specify the field, then list the items to fetch. + +```bash +lib/ansible/plugins/lookup/bitwarden.py username Google Slashdot +```