From 8c6606aeee73edfbcdef58e58a05dcf72ad5f20c Mon Sep 17 00:00:00 2001 From: Scott Buchanan Date: Tue, 14 Feb 2017 11:57:06 -0500 Subject: [PATCH] fix non-zero exit code on missing role file (#19002) --- lib/ansible/cli/galaxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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).