diff --git a/changelogs/fragments/galaxy_list_all_roles.yaml b/changelogs/fragments/galaxy_list_all_roles.yaml new file mode 100644 index 0000000000..746bea9c7b --- /dev/null +++ b/changelogs/fragments/galaxy_list_all_roles.yaml @@ -0,0 +1,2 @@ +bugfixes: + - ansible-galaxy - properly list all roles in roles_path (https://github.com/ansible/ansible/issues/43010) diff --git a/lib/ansible/cli/galaxy.py b/lib/ansible/cli/galaxy.py index fceb36eb38..afe912b2d8 100644 --- a/lib/ansible/cli/galaxy.py +++ b/lib/ansible/cli/galaxy.py @@ -493,7 +493,7 @@ class GalaxyCLI(CLI): path_files = os.listdir(role_path) path_found = True for path_file in path_files: - gr = GalaxyRole(self.galaxy, path_file) + gr = GalaxyRole(self.galaxy, path_file, path=path) if gr.metadata: install_info = gr.install_info version = None