1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

fix non-zero exit code on missing role file (#19002)

This commit is contained in:
Scott Buchanan 2017-02-14 11:57:06 -05:00 committed by René Moser
parent d94b2d802e
commit 8c6606aeee

View file

@ -344,7 +344,7 @@ class GalaxyCLI(CLI):
roles_left.append(GalaxyRole(self.galaxy, **role))
f.close()
except (IOError, OSError) as e:
display.error('Unable to open %s: %s' % (role_file, str(e)))
raise AnsibleError('Unable to open %s: %s' % (role_file, str(e)))
else:
# roles were specified directly, so we'll just go out grab them
# (and their dependencies, unless the user doesn't want us to).