diff --git a/lib/ansible/cli/galaxy.py b/lib/ansible/cli/galaxy.py index f860e0f977..1a7dc14a4a 100644 --- a/lib/ansible/cli/galaxy.py +++ b/lib/ansible/cli/galaxy.py @@ -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).