I cant find out how to do wildcards when comparing strings in Jinja. Im trying to do the following comparison with the grains['osrelease'] == '6*' but it does not seems to match. Here is my state file:
{% if grains['os_family'] == 'RedHat' %}
{% if grains['osrelease'] == '6*'* %}
yum-plugin-priorities:
pkg:
- installed
rpmforge_repos:
cmd.run:
- unless: rpm -qa | grep -q rpmforge
- names:
- require:
- pkg: yum-plugin-priorities
{% endif %}
{% if grains['osrelease'] == '5*' %}
yum-priorities:
pkg:
- latest
- require:
- pkg: yum
{% endif %}
{% endif %}
Ive been looking up and down the Jinja docs with no luck. Any help would be greatly appreciated.
~Rob