From 1803976a4071e56386c365efcb4a3744f88df5d4 Mon Sep 17 00:00:00 2001 From: Will Thames Date: Thu, 14 Aug 2014 20:38:40 +1000 Subject: [PATCH] Ensured that role version can be specified in role dependencies --- lib/ansible/playbook/play.py | 3 +++ test/integration/galaxy_rolesfile | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/playbook/play.py b/lib/ansible/playbook/play.py index cedf6ffba4..c4323f52d0 100644 --- a/lib/ansible/playbook/play.py +++ b/lib/ansible/playbook/play.py @@ -182,6 +182,9 @@ class Play(object): # dependency name pointing to SCM URL # assume role name is last part of the URL orig_path = utils.repo_url_to_role_name(orig_path) + if ',' in orig_path: + # version information for role dependency used by galaxy + orig_path = orig_path.split(',')[0] role_vars = {} if type(orig_path) == dict: diff --git a/test/integration/galaxy_rolesfile b/test/integration/galaxy_rolesfile index cf1933e6e5..43fb49e924 100644 --- a/test/integration/galaxy_rolesfile +++ b/test/integration/galaxy_rolesfile @@ -1,2 +1,2 @@ -git+http://bitbucket.org/willthames/git-ansible-galaxy,v1.2 +git+http://bitbucket.org/willthames/git-ansible-galaxy,v1.3 hg+ssh://hg@bitbucket.org/willthames/hg-ansible-galaxy