Michaels' answer is better in most cases, but there is another way which
I occasionally use for simple things.  In a vars file, do:

    foo: "{{ 'bar' if ansible_architecture == 'i386' else 'zoo' }}"

Only thing to watch out for is that the jinja2 expression must always
evaluate to *something*, so you'll virtually always need an else clause.
--
Morgan Hamill

-- 
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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to