mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #12861 from willthames/galaxy_spec_in_meta_main_fix
Allow meta/main.yml to include roles through spec file
This commit is contained in:
commit
9886829e40
3 changed files with 5 additions and 2 deletions
|
@ -27,6 +27,7 @@ from ansible.errors import AnsibleError, AnsibleParserError
|
||||||
from ansible.parsing.yaml.objects import AnsibleBaseYAMLObject
|
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
|
||||||
|
from ansible.playbook.role.requirement import RoleRequirement
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['RoleInclude']
|
__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):
|
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)
|
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)
|
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)
|
return ri.load_data(data, variable_manager=variable_manager, loader=loader)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
name: oracle_java7
|
name: oracle_java7
|
||||||
|
|
||||||
- src: git+http://bitbucket.org/willthames/git-ansible-galaxy
|
- src: git+http://bitbucket.org/willthames/git-ansible-galaxy
|
||||||
version: v1.4
|
version: v1.6
|
||||||
|
|
||||||
- src: http://bitbucket.org/willthames/hg-ansible-galaxy
|
- src: http://bitbucket.org/willthames/hg-ansible-galaxy
|
||||||
scm: hg
|
scm: hg
|
||||||
|
|
|
@ -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
|
hg+https://bitbucket.org/willthames/hg-ansible-galaxy
|
||||||
https://bitbucket.org/willthames/http-ansible-galaxy/get/master.tar.gz,,http-role
|
https://bitbucket.org/willthames/http-ansible-galaxy/get/master.tar.gz,,http-role
|
||||||
git+git@github.com:geerlingguy/ansible-role-php.git
|
git+git@github.com:geerlingguy/ansible-role-php.git
|
||||||
|
|
Loading…
Reference in a new issue