On Wed, 5 Feb 2020 11:44:23 -0800 (PST)
Rakesh Parida <[email protected]> wrote:

>   when: item
> 
> I am getting following error:
> fatal: [BLVYUM01]: FAILED! => {"msg": "The conditional check 'item' failed. 
> The error was: Invalid conditional detected: invalid syntax 

Start with this one. It's working

- hosts: localhost
  vars:
    iampython_record: iampython_record
    ece_nodes: []
  tasks:
    - set_fact:
        ece_nodes: "{{ ece_nodes + [ item ] }}"
      loop:
        - "{{ dp_record|default(None) }}"
        - "{{ iampython_record|default(None) }}"
        - "{{ iamesa_record|default(None) }}"
      when: item
    - debug:
        var: ece_nodes

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/20200205210714.76ebdbd9%40gmail.com.

Attachment: pgp5PrfMLf8oY.pgp
Description: OpenPGP digital signature

Reply via email to