Fix galaxy role info bug to support multiple roles (#70148)

* Add changelog fragment
* Update changelog
pull/70250/head
David Shrewsbury 4 years ago committed by GitHub
parent 4885ebad27
commit dd07bdf22d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- Fixes ``ansible-galaxy role info`` to support multiple roles on the command line (https://github.com/ansible/ansible/pull/70148)

@ -653,6 +653,8 @@ class GalaxyCLI(CLI):
else:
text.append(u"\t%s: %s" % (k, role_info[k]))
# make sure we have a trailing newline returned
text.append(u"")
return u'\n'.join(text)
@staticmethod
@ -970,7 +972,7 @@ class GalaxyCLI(CLI):
if role_spec:
role_info.update(role_spec)
data = self._display_role_info(role_info)
data += self._display_role_info(role_info)
self.pager(data)

@ -273,6 +273,13 @@ f_ansible_galaxy_status \
ansible-galaxy role info -p ./testroles --offline testdesc | tee out.txt
grep 'description: Top level' out.txt
# test multiple role listing
ansible-galaxy role init otherrole --init-path ./testroles
ansible-galaxy role info -p ./testroles --offline testdesc otherrole | tee out.txt
grep 'Role: testdesc' out.txt
grep 'Role: otherrole' out.txt
popd # ${role_testdir}
rm -fr "${role_testdir}"

Loading…
Cancel
Save