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
17f659a1
Commit
17f659a1
authored
Jul 30, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added some debug to galaxy
parent
29bc8f51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
21 deletions
+23
-21
lib/ansible/cli/galaxy.py
+23
-21
No files found.
lib/ansible/cli/galaxy.py
View file @
17f659a1
...
@@ -320,6 +320,7 @@ class GalaxyCLI(CLI):
...
@@ -320,6 +320,7 @@ class GalaxyCLI(CLI):
roles_done
=
[]
roles_done
=
[]
roles_left
=
[]
roles_left
=
[]
if
role_file
:
if
role_file
:
self
.
display
.
debug
(
'Getting roles from
%
s'
%
role_file
)
try
:
try
:
f
=
open
(
role_file
,
'r'
)
f
=
open
(
role_file
,
'r'
)
if
role_file
.
endswith
(
'.yaml'
)
or
role_file
.
endswith
(
'.yml'
):
if
role_file
.
endswith
(
'.yaml'
)
or
role_file
.
endswith
(
'.yml'
):
...
@@ -350,6 +351,8 @@ class GalaxyCLI(CLI):
...
@@ -350,6 +351,8 @@ class GalaxyCLI(CLI):
role
=
roles_left
.
pop
(
0
)
role
=
roles_left
.
pop
(
0
)
role_path
=
role
.
path
role_path
=
role
.
path
self
.
display
.
debug
(
'Installing role
%
s'
%
role_path
)
if
role_path
:
if
role_path
:
self
.
options
.
roles_path
=
role_path
self
.
options
.
roles_path
=
role_path
else
:
else
:
...
@@ -400,27 +403,26 @@ class GalaxyCLI(CLI):
...
@@ -400,27 +403,26 @@ class GalaxyCLI(CLI):
if
tmp_file
!=
role
.
src
:
if
tmp_file
!=
role
.
src
:
os
.
unlink
(
tmp_file
)
os
.
unlink
(
tmp_file
)
# install dependencies, if we want them
# install dependencies, if we want them
if
not
no_deps
and
installed
:
# this should use new roledepenencies code
if
not
role_data
:
#if not no_deps and installed:
role_data
=
gr
.
get_metadata
(
role
.
get
(
"name"
),
options
)
# if not role_data:
role_dependencies
=
role_data
[
'dependencies'
]
# role_data = gr.get_metadata(role.get("name"), options)
else
:
# role_dependencies = role_data['dependencies']
role_dependencies
=
role_data
[
'summary_fields'
][
'dependencies'
]
# api_fetch_role_related(api_server, 'dependencies', role_data['id'])
# else:
for
dep
in
role_dependencies
:
# role_dependencies = role_data['summary_fields']['dependencies'] # api_fetch_role_related(api_server, 'dependencies', role_data['id'])
self
.
display
.
debug
(
'Installing dep
%
s'
%
dep
)
# for dep in role_dependencies:
if
isinstance
(
dep
,
basestring
):
# if isinstance(dep, basestring):
dep
=
ansible
.
utils
.
role_spec_parse
(
dep
)
# dep = ansible.utils.role_spec_parse(dep)
else
:
# else:
dep
=
ansible
.
utils
.
role_yaml_parse
(
dep
)
# dep = ansible.utils.role_yaml_parse(dep)
if
not
get_role_metadata
(
dep
[
"name"
],
options
):
# if not get_role_metadata(dep["name"], options):
if
dep
not
in
roles_left
:
# if dep not in roles_left:
self
.
display
.
display
(
'- adding dependency:
%
s'
%
dep
[
"name"
])
# print '- adding dependency: %s' % dep["name"]
roles_left
.
append
(
dep
)
# roles_left.append(dep)
else
:
# else:
self
.
display
.
display
(
'- dependency
%
s already pending installation.'
%
dep
[
"name"
])
# print '- dependency %s already pending installation.' % dep["name"]
else
:
# else:
self
.
display
.
display
(
'- dependency
%
s is already installed, skipping.'
%
dep
[
"name"
])
# print '- dependency %s is already installed, skipping.' % dep["name"]
if
not
tmp_file
or
not
installed
:
if
not
tmp_file
or
not
installed
:
self
.
display
.
warning
(
"-
%
s was NOT installed successfully."
%
role
.
name
)
self
.
display
.
warning
(
"-
%
s was NOT installed successfully."
%
role
.
name
)
...
...
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