From e8157eab195f402c2e010776839ecb995656640f Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Sat, 22 Aug 2015 02:42:21 -0400 Subject: [PATCH] now output works for both search and info --- lib/ansible/cli/galaxy.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/ansible/cli/galaxy.py b/lib/ansible/cli/galaxy.py index 34bf81a9c8f..f8e812cac13 100644 --- a/lib/ansible/cli/galaxy.py +++ b/lib/ansible/cli/galaxy.py @@ -42,7 +42,7 @@ from ansible.playbook.role.requirement import RoleRequirement class GalaxyCLI(CLI): VALID_ACTIONS = ("init", "info", "install", "list", "remove", "search") - SKIP_INFO_KEYS = ("name", "description", "readme_html", "related", "summary_fields", "average_aw_composite", "average_aw_score", "url", "src" ) + SKIP_INFO_KEYS = ("name", "description", "readme_html", "related", "summary_fields", "average_aw_composite", "average_aw_score", "url" ) def __init__(self, args, display=None): @@ -184,7 +184,6 @@ class GalaxyCLI(CLI): text = "\nRole: %s \n" % role_info['name'] text += "\tdescription: %s \n" % role_info['description'] - text += "\tsrc: %s \n" % role_info['src'] for k in sorted(role_info.keys()): @@ -329,10 +328,9 @@ class GalaxyCLI(CLI): role_info.update(role_spec) data += self._display_role_info(role_info) - if data: - data += "\n- %s:" % (role) - else: + if not data: data += "\n- the role %s was not found" % role + self.pager(data) def execute_install(self):