community / community.general / 1.3.14 / 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 (1.3.14) — lookup
Install with ansible-galaxy collection install community.general:==1.3.14
collections: - name: community.general version: 1.3.14
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 ansible.builtin.debug: msg: "{{ query('community.general.lmdb_kv', 'nl', 'be', 'lu', db='jp.mdb') }}"
- name: use list of values in a loop by key wildcard ansible.builtin.debug: msg: "Hello from {{ item.0 }} a.k.a. {{ item.1 }}" vars: - lmdb_kv_db: jp.mdb with_community.general.lmdb_kv: - "n*"
- name: get an item by key ansible.builtin.assert: that: - item == 'Belgium' vars: - lmdb_kv_db: jp.mdb with_community.general.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 elements: raw type: list