Each module is in charge of deciding what data structures to return
and in what hierarchy so if you need the returned data from a call to
a particular piece of module functionality you do have to check that
the return value is formatted the way you expect. In this case I think
that the first two zabbix calls  only return a single value but the
last function can return multiple values if there are multiple hosts
or groupids.  So the zabbix module author chose to return an array in
the latter instance.

-Toshio

On Fri, Nov 14, 2014 at 12:25 PM, Petr Sukharev <[email protected]> wrote:
> Working like charm, thanks!
>
> i am little confused, my first and second steps get correct data, but now i
> need to use result[0]...
>
> пятница, 14 ноября 2014 г., 22:53:23 UTC+3 пользователь Romeo Theriault
> написал:
>>
>> It looks like zabbix is passing back an array containing the json data.
>>
>> Try this instead: {{ zabbix_group_id.json.result[0].groupid }}
>>
>> --
>> Romeo
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/a0901598-a745-49aa-b3a2-0e49f43c13ba%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAG9juEpNAFCL4f4JY8V_M2cYt3BzTcsNjBc4sM0%3DnxvhryPo9w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to