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

pull/21415/head
Scott Buchanan 8 years ago committed by René Moser
parent d94b2d802e
commit 8c6606aeee

@ -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).

Loading…
Cancel
Save