def load_list_of_roles(ds, play, current_role_path=None, variable_manager=None, loader=None):
 from ansible.playbook.role.include import RoleInclude
 assert isinstance(ds, list)
 roles = []
 for role_def in ds:
  i = RoleInclude.load(role_def, play=play, current_role_path=current_role_path, variable_manager=variable_manager, loader=loader)
  roles.append(i)
 return roles

def load_list_of_roles ( ds , play , current_role_path = None , variable_manager = None , loader = None ) : from ansible . playbook . role . include import RoleInclude assert isinstance ( ds , list ) roles = [ ] for role_def in ds : i = RoleInclude . load ( role_def , play = play , current_role_path = current_role_path , variable_manager = variable_manager , loader = loader ) roles . append ( i ) return roles
loads and returns a list of roleinclude objects from the datastructure list of role definitions .