__grains__['osrelease'] returns a string. Cast to int for correct comparison

This commit is contained in:
justinta89 2015-09-21 12:03:30 -06:00
parent c0943dd4d1
commit b73f5289b4

View file

@ -80,7 +80,7 @@ def _yum():
'''
contextkey = 'yum_bin'
if contextkey not in __context__:
if 'fedora' in __grains__['os'].lower() and __grains__['osrelease'] >= 22:
if 'fedora' in __grains__['os'].lower() and int(__grains__['osrelease']) >= 22:
__context__[contextkey] = 'dnf'
else:
__context__[contextkey] = 'yum'