Pass path to GalaxyRole object (#43051)
This will list all roles in all paths in roles_path rather than just the first path in roles_path.
(cherry picked from commit 05fff27415
)
This commit is contained in:
parent
2ee3786d9d
commit
fc88c13363
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/galaxy_list_all_roles.yaml
Normal file
2
changelogs/fragments/galaxy_list_all_roles.yaml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- ansible-galaxy - properly list all roles in roles_path (https://github.com/ansible/ansible/issues/43010)
|
|
@ -490,7 +490,7 @@ class GalaxyCLI(CLI):
|
||||||
path_files = os.listdir(role_path)
|
path_files = os.listdir(role_path)
|
||||||
path_found = True
|
path_found = True
|
||||||
for path_file in path_files:
|
for path_file in path_files:
|
||||||
gr = GalaxyRole(self.galaxy, path_file)
|
gr = GalaxyRole(self.galaxy, path_file, path=path)
|
||||||
if gr.metadata:
|
if gr.metadata:
|
||||||
install_info = gr.install_info
|
install_info = gr.install_info
|
||||||
version = None
|
version = None
|
||||||
|
|
Loading…
Reference in a new issue