Hi folks,
Need some help related to registered variables.
The first task in my playbook performs some operations over a nested loop and I'm registering a variable for its results. The variable looks like this -
"n_init": {
"changed": true,
"failed": true,
"msg": "One or more items failed.",
"results": [
{
"changed": true,
----
"item": [
"1098"
],
----
},
{
"changed": true,
----
"item": [
"1098"
],
----
},
----
{
"changed": true,
----
"item": [
"1098"
],
----
}
]
}
In my second task, I need to execute a script and need to pass two parameters to it, both derived from the above variable. The two parameters should have contents like this -
I've tried out few Jinja2 filters and Ansible looping constructs, but am unable to get these values off the registered variable. Any suggestions?
Thanks in advance
Regards
Abhishek