mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Correct role name detection
This commit is contained in:
parent
8dcf386def
commit
98cfcec5e2
1 changed files with 5 additions and 1 deletions
|
@ -286,7 +286,11 @@ class Play(object):
|
|||
if not os.path.isfile(task) and not os.path.isfile(handler) and not os.path.isfile(vars_file) and not os.path.isdir(library):
|
||||
raise errors.AnsibleError("found role at %s, but cannot find %s or %s or %s or %s" % (role_path, task, handler, vars_file, library))
|
||||
if os.path.isfile(task):
|
||||
nt = dict(include=pipes.quote(task), vars=role_vars, default_vars=default_vars, role_name=role['role'])
|
||||
if isinstance(role, dict):
|
||||
role_name = role['role']
|
||||
else:
|
||||
role_name = role
|
||||
nt = dict(include=pipes.quote(task), vars=role_vars, default_vars=default_vars, role_name=role_name)
|
||||
for k in special_keys:
|
||||
if k in special_vars:
|
||||
nt[k] = special_vars[k]
|
||||
|
|
Loading…
Reference in a new issue