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 671d725b0a..34f16065f4 100644 --- a/lib/ansible/cli/galaxy.py +++ b/lib/ansible/cli/galaxy.py @@ -490,7 +490,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