|
|
@ -24,6 +24,7 @@ from six import iteritems, string_types
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
|
|
from ansible.errors import AnsibleError, AnsibleParserError
|
|
|
|
from ansible.errors import AnsibleError, AnsibleParserError
|
|
|
|
|
|
|
|
from ansible.parsing.yaml.objects import AnsibleBaseYAMLObject
|
|
|
|
from ansible.playbook.attribute import Attribute, FieldAttribute
|
|
|
|
from ansible.playbook.attribute import Attribute, FieldAttribute
|
|
|
|
from ansible.playbook.role.definition import RoleDefinition
|
|
|
|
from ansible.playbook.role.definition import RoleDefinition
|
|
|
|
|
|
|
|
|
|
|
@ -42,7 +43,8 @@ class RoleInclude(RoleDefinition):
|
|
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
@staticmethod
|
|
|
|
def load(data, current_role_path=None, parent_role=None, variable_manager=None, loader=None):
|
|
|
|
def load(data, current_role_path=None, parent_role=None, variable_manager=None, loader=None):
|
|
|
|
assert isinstance(data, string_types) or isinstance(data, dict)
|
|
|
|
|
|
|
|
|
|
|
|
assert isinstance(data, string_types) or isinstance(data, dict) or isinstance(data, AnsibleBaseYAMLObject)
|
|
|
|
|
|
|
|
|
|
|
|
ri = RoleInclude(role_basedir=current_role_path)
|
|
|
|
ri = RoleInclude(role_basedir=current_role_path)
|
|
|
|
return ri.load_data(data, variable_manager=variable_manager, loader=loader)
|
|
|
|
return ri.load_data(data, variable_manager=variable_manager, loader=loader)
|
|
|
|