From d6a725659eae52e3afa6b8d8eabdcdbc857c91bd Mon Sep 17 00:00:00 2001 From: Will Thames Date: Wed, 10 Sep 2014 21:55:27 +1000 Subject: [PATCH] Allow github style ssh repo names --- lib/ansible/utils/__init__.py | 2 +- test/integration/galaxy_roles.yml | 5 +++++ test/integration/galaxy_rolesfile | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/ansible/utils/__init__.py b/lib/ansible/utils/__init__.py index fa11291776..e7166347de 100644 --- a/lib/ansible/utils/__init__.py +++ b/lib/ansible/utils/__init__.py @@ -362,7 +362,7 @@ def repo_url_to_role_name(repo_url): # gets the role name out of a repo like # http://git.example.com/repos/repo.git" => "repo" - if '://' not in repo_url: + if '://' not in repo_url and '@' not in repo_url: return repo_url trailing_path = repo_url.split('/')[-1] if trailing_path.endswith('.git'): diff --git a/test/integration/galaxy_roles.yml b/test/integration/galaxy_roles.yml index cd61006840..76b385191c 100644 --- a/test/integration/galaxy_roles.yml +++ b/test/integration/galaxy_roles.yml @@ -6,3 +6,8 @@ - src: https://bitbucket.org/willthames/http-ansible-galaxy/get/master.tar.gz name: http-role + +- src: git@github.com:geerlingguy/ansible-role-php.git + scm: git + name: php + diff --git a/test/integration/galaxy_rolesfile b/test/integration/galaxy_rolesfile index a1374925ba..31596d4914 100644 --- a/test/integration/galaxy_rolesfile +++ b/test/integration/galaxy_rolesfile @@ -1,3 +1,4 @@ git+http://bitbucket.org/willthames/git-ansible-galaxy,v1.4 hg+http://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