Also:

vars:
  vcenter_datacenter:  '{{ vcenter_hostname ==
"vcenter1"|ternary("First", vcenter_hostname ==
"vcenter2"|ternary("datacenter1", "datacenter2")) }}' Dataceenter

but i would do this:

vars:
   DCS:
      vcenter1: First
      vcenter2: datacenter1
  vcenter_datacenter: '{{ DCS[vcenter_hostname]|default("datacenter2")
}}' Datacenter

-- 
----------
Brian Coca (he/him/yo)

-- 
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/CACVha7f-Ojs5YBN9XX30-0dpH3w8M3mjeMcGHf9m3OsnOgx1Rg%40mail.gmail.com.

Reply via email to