Keep git URLs in SCP format for project updates. Fixes https://trello.com/c/xUL2FZyu

This commit is contained in:
Chris Church
2015-02-26 15:46:55 -05:00
parent 323226aefd
commit c1d90e1897
3 changed files with 72 additions and 37 deletions

View File

@@ -791,14 +791,16 @@ class RunProjectUpdate(BaseTask):
scm_password = False
if scm_url_parts.scheme != 'svn+ssh':
scm_username = False
elif scm_url_parts.scheme == 'ssh':
elif scm_url_parts.scheme.endswith('ssh'):
scm_password = False
scm_url = update_scm_url(scm_type, scm_url, scm_username,
scm_password)
scm_password, scp_format=True)
else:
scm_url = update_scm_url(scm_type, scm_url, scp_format=True)
# When using Ansible >= 1.5, pass the extra accept_hostkey parameter to
# the git module.
if scm_type == 'git' and scm_url_parts.scheme == 'ssh':
if scm_type == 'git' and scm_url_parts.scheme.endswith('ssh'):
try:
if Version(kwargs['ansible_version']) >= Version('1.5'):
extra_vars['scm_accept_hostkey'] = 'true'