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
68e21aa4
Commit
68e21aa4
authored
Aug 21, 2014
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comments about what these new functions do.
parent
6e9abefc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
lib/ansible/utils/__init__.py
+13
-0
No files found.
lib/ansible/utils/__init__.py
View file @
68e21aa4
...
...
@@ -353,6 +353,9 @@ def path_dwim_relative(original, dirname, source, playbook_base, check=True):
return
source2
# which does not exist
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
:
return
repo_url
trailing_path
=
repo_url
.
split
(
'/'
)[
-
1
]
...
...
@@ -366,6 +369,16 @@ def repo_url_to_role_name(repo_url):
def
role_spec_parse
(
role_spec
):
# takes a repo and a version like
# git+http://git.example.com/repos/repo.git,v1.0
# and returns a list of properties such as:
# {
# 'scm': 'git',
# 'src': 'http://git.example.com/repos/repo.git',
# 'version': 'v1.0',
# 'name': 'repo'
# }
role_spec
=
role_spec
.
strip
()
role_version
=
''
if
role_spec
==
""
or
role_spec
.
startswith
(
"#"
):
...
...
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