ansible / ansible.builtin / v2.16.0 / filter / dict2items Convert a dictionary into an itemized list of dictionaries | "added in version" 2.6 of ansible.builtin" Authors: Ansible core teamansible.builtin.dict2items (v2.16.0) — filter
pip
Install with pip install ansible-core==2.16.0
Takes a dictionary and transforms it into a list of dictionaries, with each having a C(key) and C(value) keys that correspond to the keys and values of the original.
_input: description: - The dictionary to transform required: true type: dict key_name: default: key description: The name of the property on the item representing the dictionary's keys. type: str version_added: '2.8' version_added_collection: ansible.builtin value_name: default: value description: The name of the property on the item representing the dictionary's values. type: str version_added: '2.8' version_added_collection: ansible.builtin
_value: description: A list of dictionaries. elements: dict type: list