mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Corrected bug where role_path was wrong for roles in subdirectories
Fixed role name for
- { role: 'lives/in/a/subdirectory' }
Should be 'lives/in/a/subdirectory', not just 'subdirectory'
This commit is contained in:
committed by
Michael DeHaan
parent
bf9ea81c4b
commit
6e9abefc11
@@ -353,6 +353,8 @@ def path_dwim_relative(original, dirname, source, playbook_base, check=True):
|
||||
return source2 # which does not exist
|
||||
|
||||
def repo_url_to_role_name(repo_url):
|
||||
if '://' not in repo_url:
|
||||
return repo_url
|
||||
trailing_path = repo_url.split('/')[-1]
|
||||
if trailing_path.endswith('.git'):
|
||||
trailing_path = trailing_path[:-4]
|
||||
|
||||
Reference in New Issue
Block a user