Sometimes is needed to convert one list into other, usually this is done with map function that convert each list item into different one. For example constructing port field for all the ethernet interfaces: Cature `ethernet-ifaces: interfaces.type==ethernet` DesiredState without JSON `port: "{{ capture.ethernet-ifaces.interfaces -> .name }}"` with JSON (it allos to add more fields to the returned item `port: "{{ capture.ethernet-ifaces.interfaces -> { "name": .name } }}"` This should convert the list of interfaces into a list of bridge/bond ports, if more than one attribute is needed json can be used.
Sometimes is needed to convert one list into other, usually this is done with map function that convert each list item into different one.
For example constructing port field for all the ethernet interfaces:
Cature
ethernet-ifaces: interfaces.type==ethernetDesiredState
without JSON
port: "{{ capture.ethernet-ifaces.interfaces -> .name }}"with JSON (it allos to add more fields to the returned item
port: "{{ capture.ethernet-ifaces.interfaces -> { "name": .name } }}"This should convert the list of interfaces into a list of bridge/bond ports, if more than one attribute is needed json can be used.