Re: [ansible-project] Parse JSON output from uri module

2015-04-16 Thread Michael Liu
Thanks this was very helpful. Banged my head against the keyboard for about 2 hours before I found this page. On Sunday, November 16, 2014 at 9:24:02 AM UTC-8, tkuratomi wrote: > > Each module is in charge of deciding what data structures to return > and in what hierarchy so if you need the ret

Re: [ansible-project] Parse JSON output from uri module

2014-11-16 Thread Toshio Kuratomi
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 za

Re: [ansible-project] Parse JSON output from uri module

2014-11-14 Thread Petr Sukharev
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

Re: [ansible-project] Parse JSON output from uri module

2014-11-14 Thread 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 }} If that doesn't work, what do you get when you do: {{ zabbix_group_id.json.result[0] }} or just {{ zabbix_group_id.json.result }} On Fri, Nov 14, 2014 at 6:27 AM

[ansible-project] Parse JSON output from uri module

2014-11-14 Thread Petr Sukharev
Hello! I have some strange problem with register option in role and json fomat. I try to communicate with my Monitoring System (Zabbix) via Zabbix API. A need to send some data, collect some data and make some work around results. Here is output: PLAY [all]