Hi,

The playbook is as follows and highlighted text is added. 

---
- hosts: localhost
  connection: local
  gather_facts: no
  tasks:
   - name: ILO Facts
     hpilo_facts:
      host: 10.20.64.51
      login: xxxxxxx
      password: xxxxxxx
     delegate_to: localhost

   - debug:
       msg: "{{item}}"
     with_dict: "{{ hw_health.storage['Controller on System 
Board']['logical_drives'] }}"
     when:
      - "'physical_drives' in item.key"


   - debug:
      var: "{{ msg| selectattr('status', 'equalto', 'CRIRICAL') | list }}"


On Tuesday, January 8, 2019 at 9:39:48 PM UTC+5:30, Kai Stian Olstad wrote:
>
> On Tuesday, 8 January 2019 14:31:23 CET Rama wrote: 
> > Thank you for your reply.  I added another 'debug', var with given jinja 
> > variable. But unfortunately, it gives error with below. Can you please 
> > assist. 
> > 
> > 
> > fatal: [localhost]: FAILED! => {"msg": "The task includes an option with 
> an 
> > undefined variable. The error was: 'msg' is undefined\n\nThe error 
> appears 
> > to have been in '/root/devices..yml': line 20, column 6, but may\nbe 
> > elsewhere in the file depending on the exact syntax problem.\n\nThe 
> > offending line appears to be:\n\n\n   - debug:\n     ^ here\n"} 
>
> Without the code there is nothing I can do to assist. 
>
>
> -- 
> Kai Stian Olstad 
>
>
>

-- 
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/819c1ec5-a925-4027-b7d7-2130e257b657%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to