Hi,
I have a variable aaa, and its content is formatted in json format . I’m trying to run a ‘find’ command on the value of “output” , however i’m not sure how I can just get the value of “output” I tried *, brackets… with no success
when: aaa.*.output.find(‘Error’) != -1
`
ok: [77.88.111.33] => {
“msg”: [
{
“_ansible_item_result”: true,
“_ansible_no_log”: false,
“_ansible_parsed”: true,
“changed”: true,
“delta”: “0:00:08.218126”,
“end”: “2018-07-20 15:50:41.544217”,
“invocation”: {
“module_args”: {
“admin”: true,
“xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”: “VALUE_SPECIFIED_IN_NO_LOG_PARAMETER”,
“xxxxxxxxxxxxxxxxxxxx”: “VALUE_SPECIFIED_IN_NO_LOG_PARAMETER”,
“cmd”: “xxxxxxxxxxxxx”
}
},
“item”: {
“name”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”,
“value”: “both"”
},
“output”: " xxxxxxxxxxxxxxx",
“start”: “2018-07-20 15:50:33.326091”
},
{
“_ansible_item_result”: true,
“_ansible_no_log”: false,
“_ansible_parsed”: true,
“changed”: true,
“delta”: “0:00:08.425385”,
“end”: “2018-07-20 15:50:50.489889”,
“invocation”: {
“module_args”: {
“xxxxx”: true,
“xxxxxxxxx”: “VALUE_SPECIFIED_IN_NO_LOG_PARAMETER”,
“xxxxx”: “VALUE_SPECIFIED_IN_NO_LOG_PARAMETER”,
“cmd”: “xxxxxxxxxxxxxxx”
}
},
“item”: {
“name”: “xxxxxxxxxxxxxxxxxxxxxx”,
“value”: “9”
},
“output”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”,
“start”: “2018-07-20 15:50:42.064504”
}
]
}
`
any tip is appreciated.
Thanks