mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Need to take URLs into account when running playbooks too
Ensure that if meta/main.yml has dependencies containing URLs these are correctly resolved at playbook runtime. Update role_name during run time so that output of e.g. task names look sensible
This commit is contained in:
parent
bf3066e650
commit
b550cb9bc3
1 changed files with 6 additions and 0 deletions
|
@ -178,6 +178,10 @@ class Play(object):
|
|||
returns any variables that were included with the role
|
||||
"""
|
||||
orig_path = template(self.basedir,role,self.vars)
|
||||
if '+' in orig_path and '://' in orig_path:
|
||||
# dependency name pointing to SCM URL
|
||||
# assume role name is last part of the URL
|
||||
orig_path = orig_path.split('/')[-1]
|
||||
|
||||
role_vars = {}
|
||||
if type(orig_path) == dict:
|
||||
|
@ -412,6 +416,8 @@ class Play(object):
|
|||
role_name = role['role']
|
||||
else:
|
||||
role_name = role
|
||||
if '+' in role_name and '://' in role_name:
|
||||
role_name = role_name.split('/')[-1]
|
||||
|
||||
role_names.append(role_name)
|
||||
if os.path.isfile(task):
|
||||
|
|
Loading…
Add table
Reference in a new issue