ansible / ansible.builtin / v2.16.0 / filter / extract extract a value based on an index or key | "added in version" 2.1 of ansible.builtin" Authors: unknownansible.builtin.extract (v2.16.0) — filter
pip
Install with pip install ansible-core==2.16.0
Extract a value from a list or dictionary based on an index/key.
User must ensure that index or key used matches the type of container.
Equivalent of using C(list[index]) and C(dictionary[key]) but useful as a filter to combine with C(map).
_input: description: Index or key to extract. required: true type: raw morekeys: description: Indicies or keys to extract from the initial result (subkeys/subindices). elements: dictionary required: true type: list container: description: Dictionary or list from which to extract a value. required: true type: raw
_value: description: Resulting merge of supplied dictionaries. type: dict