pre 2.0

set_fact:
  uberHost: "{{ ansible_ssh_host }}"
when: ansible_ssh_host is defined

set fact:
  uberHost: "{{ inventory_hostname }}"
when: ansible_ssh_host is not defined


Post 2.0, changed to use ansible_host
uberHost is always getting set to null 
ansible_host is defined and set to null even when it's not present in the 
inventory file
I haven't figured out how to test to see if ansible_host is null in a when 
clause.


-- 
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/ce3c97d5-f321-4ab6-868f-e83a11aa863f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to