.. _ansible.utils.to_paths_lookup: ********************** ansible.utils.to_paths ********************** **Flatten a complex object into a dictionary of paths and values** Version added: 1.0 .. contents:: :local: :depth: 1 Synopsis -------- - Flatten a complex object into a dictionary of paths and values. - Paths are dot delimited whenever possible - Brakets are used for list indicies and keys that contain special characters - ``to_paths`` is also available as a filter plugin Parameters ---------- .. raw:: html
Parameter | Choices/Defaults | Configuration | Comments |
---|---|---|---|
_terms
-
/ required
|
The values below provided in the order
var , prepend= , wantlist= . |
||
prepend
string
|
Prepend each path entry. Useful to add the initial
var name. |
||
var
raw
/ required
|
The value of
var will be will be used. |
||
wantlist
boolean
|
|
If set to
True , the return value will always be a list. This can also be accomplished using query or q instead of lookup . https://docs.ansible.com/ansible/latest/plugins/lookup.html |
Key | Returned | Description |
---|---|---|
_raw
-
|
A dictionary of key value pairs
The key is the path
The value is the value
|