Hi,

I'm hoping someone can help with this. 

I'm attempting to simply the when logic rather than have to have a long 
list of or statements.

Currently, the following works for me:

- name: Get Web URL Status
  uri: url="https://{{ ansible_fqdn }}:8443/web/servlet" return_content=yes 
validate_certs=no
  register: webRslt
  when: "'CCIALL' in group_names or 'BATCHALL' in group_names"

Is there a way in which I can just write the when statement something like 
this....
when: "'CCIALL' or 'BATCHALL' in group_names"   (This doesn't work, it just 
checks all servers rather than only check those which match the 2 groups 
listed)

Rather than increase the number of Ansible inventory groupings, I'm hoping 
I can just have a shorter when statement.

Thanks.

-- 
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/a268986f-c764-438b-9a30-10144cfb62c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to