diff --git a/lib/ansible/playbook/role/include.py b/lib/ansible/playbook/role/include.py index fd8e4e5d992..f2cf9ec5b65 100644 --- a/lib/ansible/playbook/role/include.py +++ b/lib/ansible/playbook/role/include.py @@ -27,6 +27,7 @@ from ansible.errors import AnsibleError, AnsibleParserError from ansible.parsing.yaml.objects import AnsibleBaseYAMLObject from ansible.playbook.attribute import Attribute, FieldAttribute from ansible.playbook.role.definition import RoleDefinition +from ansible.playbook.role.requirement import RoleRequirement __all__ = ['RoleInclude'] @@ -47,6 +48,8 @@ class RoleInclude(RoleDefinition): def load(data, play, current_role_path=None, parent_role=None, variable_manager=None, loader=None): assert isinstance(data, string_types) or isinstance(data, dict) or isinstance(data, AnsibleBaseYAMLObject) + if isinstance(data, string_types) and ',' in data: + data = RoleRequirement.role_spec_parse(data) ri = RoleInclude(play=play, role_basedir=current_role_path, variable_manager=variable_manager, loader=loader) return ri.load_data(data, variable_manager=variable_manager, loader=loader) diff --git a/test/integration/galaxy_roles.yml b/test/integration/galaxy_roles.yml index 5a1f8eba86d..5f4373c5004 100644 --- a/test/integration/galaxy_roles.yml +++ b/test/integration/galaxy_roles.yml @@ -3,7 +3,7 @@ name: oracle_java7 - src: git+http://bitbucket.org/willthames/git-ansible-galaxy - version: v1.4 + version: v1.6 - src: http://bitbucket.org/willthames/hg-ansible-galaxy scm: hg diff --git a/test/integration/galaxy_rolesfile b/test/integration/galaxy_rolesfile index 00be59b1036..0caf1c25336 100644 --- a/test/integration/galaxy_rolesfile +++ b/test/integration/galaxy_rolesfile @@ -1,4 +1,4 @@ -git+https://bitbucket.org/willthames/git-ansible-galaxy,v1.4 +git+https://bitbucket.org/willthames/git-ansible-galaxy,v1.6 hg+https://bitbucket.org/willthames/hg-ansible-galaxy https://bitbucket.org/willthames/http-ansible-galaxy/get/master.tar.gz,,http-role git+git@github.com:geerlingguy/ansible-role-php.git