1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

remove properties from vars in include_role (#38968)

* remove properties from vars in include_role
* also from_ args
This commit is contained in:
Brian Coca 2018-05-01 10:16:59 -04:00 committed by GitHub
parent bd8206b556
commit b9f7f582d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -149,7 +149,7 @@ class IncludedFile:
inc_file = IncludedFile(include_file, include_variables, original_task)
else:
# template the included role's name here
role_name = include_variables.get('name', include_variables.get('role', None))
role_name = include_variables.pop('name', include_variables.pop('role', None))
if role_name is not None:
role_name = templar.template(role_name)
@ -158,7 +158,7 @@ class IncludedFile:
for from_arg in new_task.FROM_ARGS:
if from_arg in include_variables:
from_key = from_arg.replace('_from', '')
new_task._from_files[from_key] = templar.template(include_variables[from_arg])
new_task._from_files[from_key] = templar.template(include_variables.pop(from_arg))
inc_file = IncludedFile(role_name, include_variables, new_task, is_role=True)