community / community.general / 0.2.1 / lookup / lmdb_kv fetch data from LMDB | "added in version" 0.2.0 of community.general" Authors: Jan-Piet Mens (@jpmens)community.general.lmdb_kv (0.2.1) — lookup
Install with ansible-galaxy collection install community.general:==0.2.1
collections: - name: community.general version: 0.2.1
This lookup returns a list of results from an LMDB DB corresponding to a list of items given to it
- name: query LMDB for a list of country codes debug: msg: "{{ query('lmdb_kv', 'nl', 'be', 'lu', db='jp.mdb') }}"
- name: use list of values in a loop by key wildcard debug: msg: "Hello from {{ item.0 }} a.k.a. {{ item.1 }}" vars: - lmdb_kv_db: jp.mdb with_lmdb_kv: - "n*"
- name: get an item by key assert: that: - item == 'Belgium' vars: - lmdb_kv_db: jp.mdb with_lmdb_kv: - be
db: default: ansible.mdb description: path to LMDB database _terms: description: list of keys to query
_raw: description: value(s) stored in LMDB