Cast input role version to string before comparing to available versions (#18269)

* Cast input role version to string before comparing to avaialble versions

Fixes #10262
pull/18276/head
jctanner 8 years ago committed by GitHub
parent e753860cb2
commit b494d55bde

@ -237,7 +237,7 @@ class GalaxyRole(object):
else:
self.version = 'master'
elif self.version != 'master':
if role_versions and self.version not in [a.get('name', None) for a in role_versions]:
if role_versions and str(self.version) not in [a.get('name', None) for a in role_versions]:
raise AnsibleError("- the specified version (%s) of %s was not found in the list of available versions (%s)." % (self.version, self.name, role_versions))
tmp_file = self.fetch(role_data)

Loading…
Cancel
Save