On Tuesday, 8 January 2019 18:26:54 CET Rama wrote:
> 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 }}"

You don't have any variable in here called msg, so when you use msg in the 
debug task it will fail with undefined variable.
In you first mail you did have an output that was called msg.


-- 
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/4028874.LiXk1REK3k%40x1.
For more options, visit https://groups.google.com/d/optout.

Reply via email to