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 sensiblepull/4420/head
parent
bf3066e650
commit
b550cb9bc3
|
@ -178,6 +178,10 @@ class Play(object):
|
||||||
returns any variables that were included with the role
|
returns any variables that were included with the role
|
||||||
"""
|
"""
|
||||||
orig_path = template(self.basedir,role,self.vars)
|
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 = {}
|
role_vars = {}
|
||||||
if type(orig_path) == dict:
|
if type(orig_path) == dict:
|
||||||
|
@ -412,6 +416,8 @@ class Play(object):
|
||||||
role_name = role['role']
|
role_name = role['role']
|
||||||
else:
|
else:
|
||||||
role_name = role
|
role_name = role
|
||||||
|
if '+' in role_name and '://' in role_name:
|
||||||
|
role_name = role_name.split('/')[-1]
|
||||||
|
|
||||||
role_names.append(role_name)
|
role_names.append(role_name)
|
||||||
if os.path.isfile(task):
|
if os.path.isfile(task):
|
||||||
|
|
Loading…
Reference in New Issue