This won't work as playbooks themselves are not jinja2 evaluated, only
keys inside a play are

          {% if oracle in job_temp_name %}
          ansible_distribution: "RedHat"
          patch_enablerepo: "value"
          standard_enablerepo: "value"
          {% endif %}

An alternative would be:
          ansible_distribution: "{{ oracle in job_temp_name|
ternary('RedHat', omit) }}"
          patch_enablerepo: "{{ oracle in job_temp_name|
ternary('value', omit) }}"
          standard_enablerepo: "{{ oracle in job_temp_name|
ternary('value', omit) }}"

----------
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/CACVha7d8dSyTJRb0157ofFM5aCcxfPK6NKyzw_SPQS5bRzVXFw%40mail.gmail.com.

Reply via email to