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
4698f85e
Commit
4698f85e
authored
Sep 02, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8789 from retr0h/retr0h/add-role-path-to-role-file
Can override each role's install path
parents
bee1f8f4
44b0ee53
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletions
+12
-1
bin/ansible-galaxy
+8
-1
docsite/rst/galaxy.rst
+4
-0
No files found.
bin/ansible-galaxy
View file @
4698f85e
...
@@ -526,7 +526,7 @@ def install_role(role_name, role_version, role_filename, options):
...
@@ -526,7 +526,7 @@ def install_role(role_name, role_version, role_filename, options):
# we strip off the top-level directory for all of the files contained within
# we strip off the top-level directory for all of the files contained within
# the tar file here, since the default is 'github_repo-target', and change it
# the tar file here, since the default is 'github_repo-target', and change it
# to the specified role's name
# to the specified role's name
role_path
=
os
.
path
.
join
(
get_opt
(
options
,
'roles_path'
,
'/etc/ansible/roles'
),
role_name
)
role_path
=
os
.
path
.
join
(
get_opt
(
options
,
'roles_path'
),
role_name
)
role_path
=
os
.
path
.
expanduser
(
role_path
)
role_path
=
os
.
path
.
expanduser
(
role_path
)
print
"- extracting
%
s to
%
s"
%
(
role_name
,
role_path
)
print
"- extracting
%
s to
%
s"
%
(
role_name
,
role_path
)
try
:
try
:
...
@@ -689,6 +689,7 @@ def execute_install(args, options, parser):
...
@@ -689,6 +689,7 @@ def execute_install(args, options, parser):
role_file
=
get_opt
(
options
,
"role_file"
,
None
)
role_file
=
get_opt
(
options
,
"role_file"
,
None
)
api_server
=
get_opt
(
options
,
"api_server"
,
"galaxy.ansible.com"
)
api_server
=
get_opt
(
options
,
"api_server"
,
"galaxy.ansible.com"
)
no_deps
=
get_opt
(
options
,
"no_deps"
,
False
)
no_deps
=
get_opt
(
options
,
"no_deps"
,
False
)
roles_path
=
get_opt
(
options
,
"roles_path"
)
if
len
(
args
)
==
0
and
not
role_file
:
if
len
(
args
)
==
0
and
not
role_file
:
# the user needs to specify one of either --role-file
# the user needs to specify one of either --role-file
...
@@ -723,6 +724,12 @@ def execute_install(args, options, parser):
...
@@ -723,6 +724,12 @@ def execute_install(args, options, parser):
role
=
roles_left
.
pop
(
0
)
role
=
roles_left
.
pop
(
0
)
role_src
=
role
.
get
(
"src"
)
role_src
=
role
.
get
(
"src"
)
role_scm
=
role
.
get
(
"scm"
)
role_scm
=
role
.
get
(
"scm"
)
role_path
=
role
.
get
(
"path"
)
if
role_path
:
options
.
roles_path
=
role_path
else
:
options
.
roles_path
=
roles_path
if
os
.
path
.
isfile
(
role_src
):
if
os
.
path
.
isfile
(
role_src
):
# installing a local tar.gz
# installing a local tar.gz
...
...
docsite/rst/galaxy.rst
View file @
4698f85e
...
@@ -69,6 +69,10 @@ And here's an example showing some specific version downloads from multiple sour
...
@@ -69,6 +69,10 @@ And here's an example showing some specific version downloads from multiple sour
# from github
# from github
- src: https://github.com/bennojoy/nginx
- src: https://github.com/bennojoy/nginx
# from github installing to a relative path
- src: https://github.com/bennojoy/nginx
path: vagrant/roles/
# from github, overriding the name and specifying a specific tag
# from github, overriding the name and specifying a specific tag
- src: https://github.com/bennojoy/nginx
- src: https://github.com/bennojoy/nginx
name: nginx_role
name: nginx_role
...
...
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