Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
578e8811
Commit
578e8811
authored
Jun 16, 2014
by
Matt Bray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for urls like
ssh://git@github.com/ansible/ansible.git
parent
fafc3591
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
lib/ansible/module_utils/known_hosts.py
+3
-1
No files found.
lib/ansible/module_utils/known_hosts.py
View file @
578e8811
...
@@ -50,7 +50,7 @@ def add_git_host_key(module, url, accept_hostkey=True, create_dir=True):
...
@@ -50,7 +50,7 @@ def add_git_host_key(module, url, accept_hostkey=True, create_dir=True):
if
rc
!=
0
:
if
rc
!=
0
:
module
.
fail_json
(
msg
=
"failed to add
%
s hostkey:
%
s"
%
(
fqdn
,
out
+
err
))
module
.
fail_json
(
msg
=
"failed to add
%
s hostkey:
%
s"
%
(
fqdn
,
out
+
err
))
else
:
else
:
module
.
fail_json
(
msg
=
"
%
s has an unknown hostkey. Set accept_hostkey to True or manually add the hostkey prior to running the git module"
%
fqdn
)
module
.
fail_json
(
msg
=
"
%
s has an unknown hostkey. Set accept_hostkey to True or manually add the hostkey prior to running the git module"
%
fqdn
)
def
get_fqdn
(
repo_url
):
def
get_fqdn
(
repo_url
):
...
@@ -71,6 +71,8 @@ def get_fqdn(repo_url):
...
@@ -71,6 +71,8 @@ def get_fqdn(repo_url):
parts
=
urlparse
.
urlparse
(
repo_url
)
parts
=
urlparse
.
urlparse
(
repo_url
)
if
parts
[
1
]
!=
''
:
if
parts
[
1
]
!=
''
:
result
=
parts
[
1
]
result
=
parts
[
1
]
if
"@"
in
result
:
result
=
result
.
split
(
"@"
,
1
)[
1
]
return
result
return
result
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment