mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07: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:
parent
bf9ea81c4b
commit
6e9abefc11
2 changed files with 8 additions and 5 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue