On Monday, March 5, 2018 at 7:12:13 PM UTC+11, Varun Chopra wrote:
>
> You can access the first element using 
> result.ansible_facts.napalm_environment.cpu[0].%usage or so.
>
> On Monday, March 5, 2018 at 1:17:28 PM UTC+5:30, Marcos Georgopoulos wrote:
>>
>>
>>
Thanks I had tried that but it does not work. See below.

PLAY [Device Pre testing] 
********************************************************************************************************************************************************************************************************************


TASK [get facts from device] 
*****************************************************************************************************************************************************************************************************************

ok: [172.16.1.127]


TASK [print data] 
****************************************************************************************************************************************************************************************************************************

fatal: [172.16.1.127]: FAILED! => {"failed": true, "msg": "template error 
while templating string: expected name or number. String: {{  
result.ansible_facts.napalm_environment.cpu[0].%usage }} "}

to retry, use: --limit 
@/Users/marcosgeorgopoulos/Documents/Ansible/napalm/test.retry


PLAY RECAP 
***********************************************************************************************************************************************************************************************************************************

172.16.1.127               : ok=1    changed=0    unreachable=0    failed=1  
 
 

-- 
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/20c6d220-f454-4e57-9d95-baccdbb14484%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to