Hi all, bit of a newbie to json out etc, anyone help me with command to get these onto one line each, as in one field from each group, many thanks
TASK [Display all devices] **********************************************************************************************************************************
ok: [localhost] => {
"msg": [
[
"MIATFLADQH004.edg.centurylink.net (fc:96:43:37:e5:40)",
"MIATFLADQH004.edg.centurylink.net (fc:96:43:37:e5:40)",
"LONDENEHQH003.edg.centurylink.net (00:cc:34:af:10:00)",
"LONDENEHQH003.edg.centurylink.net (00:cc:34:af:10:00)"
],
[
"MIATFLADSN0201SNC02",
"MIATFLADSN0201SNC01",
"LONDENEHSN0201SNC01",
"LONDENEHSN0201SNC02"
],
[
"et-0/0/2",
"et-0/0/0",
"et-0/0/0",
"et-0/0/2"
],
[
"e1a",
"e1a",
"e1a",
"e1a"
]
]
}
my msg params are as follows;
- name: Display all devices
debug:
msg: "{{ echo | community.general.json_query('[results[].msg.records[].discovered_device,results[].msg.records[].node,results[].msg.records[].interface,results[].msg.records[].port]' ) }}"