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
7215470c
Commit
7215470c
authored
Jul 24, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implemented galaxy list in v2
parent
9abd9a8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
lib/ansible/cli/galaxy.py
+5
-3
No files found.
lib/ansible/cli/galaxy.py
View file @
7215470c
...
@@ -452,7 +452,8 @@ class GalaxyCLI(CLI):
...
@@ -452,7 +452,8 @@ class GalaxyCLI(CLI):
if
len
(
self
.
args
)
==
1
:
if
len
(
self
.
args
)
==
1
:
# show only the request role, if it exists
# show only the request role, if it exists
gr
=
GalaxyRole
(
self
.
galaxy
,
self
.
name
)
name
=
self
.
args
.
pop
()
gr
=
GalaxyRole
(
self
.
galaxy
,
name
)
if
gr
.
metadata
:
if
gr
.
metadata
:
install_info
=
gr
.
install_info
install_info
=
gr
.
install_info
version
=
None
version
=
None
...
@@ -461,9 +462,9 @@ class GalaxyCLI(CLI):
...
@@ -461,9 +462,9 @@ class GalaxyCLI(CLI):
if
not
version
:
if
not
version
:
version
=
"(unknown version)"
version
=
"(unknown version)"
# show some more info about single roles here
# show some more info about single roles here
self
.
display
.
display
(
"-
%
s,
%
s"
%
(
self
.
name
,
version
))
self
.
display
.
display
(
"-
%
s,
%
s"
%
(
name
,
version
))
else
:
else
:
self
.
display
.
display
(
"- the role
%
s was not found"
%
self
.
name
)
self
.
display
.
display
(
"- the role
%
s was not found"
%
name
)
else
:
else
:
# show all valid roles in the roles_path directory
# show all valid roles in the roles_path directory
roles_path
=
self
.
get_opt
(
'roles_path'
)
roles_path
=
self
.
get_opt
(
'roles_path'
)
...
@@ -474,6 +475,7 @@ class GalaxyCLI(CLI):
...
@@ -474,6 +475,7 @@ class GalaxyCLI(CLI):
raise
AnsibleOptionsError
(
"-
%
s exists, but it is not a directory. Please specify a valid path with --roles-path"
%
roles_path
)
raise
AnsibleOptionsError
(
"-
%
s exists, but it is not a directory. Please specify a valid path with --roles-path"
%
roles_path
)
path_files
=
os
.
listdir
(
roles_path
)
path_files
=
os
.
listdir
(
roles_path
)
for
path_file
in
path_files
:
for
path_file
in
path_files
:
gr
=
GalaxyRole
(
self
.
galaxy
,
path_file
)
if
gr
.
metadata
:
if
gr
.
metadata
:
install_info
=
gr
.
metadata
install_info
=
gr
.
metadata
version
=
None
version
=
None
...
...
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