Hi guys! I'm experiencing an interesting issue that I can't figure out.

Every host in my inventory file has an "alias" variable assigned to it.

Now, I'm trying to run a template play on some of the hosts:

- name: Hosts file
  template:
    src=hosts.j2   
    dest=/etc/hosts
  when: (alias != "leia") or (alias != "luke") or (alias != "vader")

If I turn those conditionals from != to ==, the play only runs on those 3 
servers as expected. But if I run it like it is above, it runs on ALL hosts.

What am I dong wrong?

Thanks in advance!

-- 
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/f6c527d7-3482-4921-988c-004fb7fcc263%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to