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
2e95e21c
Commit
2e95e21c
authored
Aug 21, 2014
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove some debug in ansible-galaxy upgrades, one of which raises errors down some code paths.
parent
56ce56fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
bin/ansible-galaxy
+6
-7
No files found.
bin/ansible-galaxy
View file @
2e95e21c
...
@@ -344,13 +344,14 @@ def scm_archive_role(scm, role_url, role_version, role_name):
...
@@ -344,13 +344,14 @@ def scm_archive_role(scm, role_url, role_version, role_name):
clone_cmd
=
[
scm
,
'clone'
,
role_url
,
role_name
]
clone_cmd
=
[
scm
,
'clone'
,
role_url
,
role_name
]
with
open
(
'/dev/null'
,
'w'
)
as
devnull
:
with
open
(
'/dev/null'
,
'w'
)
as
devnull
:
try
:
try
:
print
"- executing:
%
s"
%
" "
.
join
(
clone_cmd
)
popen
=
subprocess
.
Popen
(
clone_cmd
,
cwd
=
tempdir
,
stdout
=
devnull
,
stderr
=
devnull
)
popen
=
subprocess
.
Popen
(
clone_cmd
,
cwd
=
tempdir
,
stdout
=
devnull
,
stderr
=
devnull
)
except
:
except
:
raise
AnsibleError
(
"error executing:
%
s"
%
" "
.
join
(
clone_cmd
))
raise
AnsibleError
(
"error executing:
%
s"
%
" "
.
join
(
clone_cmd
))
rc
=
popen
.
wait
()
rc
=
popen
.
wait
()
if
rc
!=
0
:
if
rc
!=
0
:
print
"
C
ommand
%
s failed"
%
' '
.
join
(
clone_cmd
)
print
"
- c
ommand
%
s failed"
%
' '
.
join
(
clone_cmd
)
print
"in directory
%
s"
%
tempdir
print
"
in directory
%
s"
%
tempdir
return
False
return
False
temp_file
=
tempfile
.
NamedTemporaryFile
(
delete
=
False
,
suffix
=
'.tar'
)
temp_file
=
tempfile
.
NamedTemporaryFile
(
delete
=
False
,
suffix
=
'.tar'
)
...
@@ -367,12 +368,13 @@ def scm_archive_role(scm, role_url, role_version, role_name):
...
@@ -367,12 +368,13 @@ def scm_archive_role(scm, role_url, role_version, role_name):
archive_cmd
.
append
(
'HEAD'
)
archive_cmd
.
append
(
'HEAD'
)
with
open
(
'/dev/null'
,
'w'
)
as
devnull
:
with
open
(
'/dev/null'
,
'w'
)
as
devnull
:
print
"- executing:
%
s"
%
" "
.
join
(
archive_cmd
)
popen
=
subprocess
.
Popen
(
archive_cmd
,
cwd
=
os
.
path
.
join
(
tempdir
,
role_name
),
popen
=
subprocess
.
Popen
(
archive_cmd
,
cwd
=
os
.
path
.
join
(
tempdir
,
role_name
),
stderr
=
devnull
,
stdout
=
devnull
)
stderr
=
devnull
,
stdout
=
devnull
)
rc
=
popen
.
wait
()
rc
=
popen
.
wait
()
if
rc
!=
0
:
if
rc
!=
0
:
print
"
C
ommand
%
s failed"
%
' '
.
join
(
archive_cmd
)
print
"
- c
ommand
%
s failed"
%
' '
.
join
(
archive_cmd
)
print
"in directory
%
s"
%
tempdir
print
"
in directory
%
s"
%
tempdir
return
False
return
False
shutil
.
rmtree
(
tempdir
)
shutil
.
rmtree
(
tempdir
)
...
@@ -495,8 +497,6 @@ def install_role(role_name, role_version, role_filename, options):
...
@@ -495,8 +497,6 @@ def install_role(role_name, role_version, role_filename, options):
# the file is a tar, so open it that way and extract it
# the file is a tar, so open it that way and extract it
# to the specified (or default) roles directory
# to the specified (or default) roles directory
print
"DEBUG: FN=
%
s"
%
role_filename
if
not
tarfile
.
is_tarfile
(
role_filename
):
if
not
tarfile
.
is_tarfile
(
role_filename
):
print
"Error: the file downloaded was not a tar.gz"
print
"Error: the file downloaded was not a tar.gz"
return
False
return
False
...
@@ -759,7 +759,6 @@ def execute_install(args, options, parser):
...
@@ -759,7 +759,6 @@ def execute_install(args, options, parser):
role
[
"version"
]
=
str
(
loose_versions
[
-
1
])
role
[
"version"
]
=
str
(
loose_versions
[
-
1
])
else
:
else
:
role
[
"version"
]
=
'master'
role
[
"version"
]
=
'master'
print
" no version specified, installing
%
s"
%
role
.
version
else
:
else
:
if
role_versions
and
role
[
"version"
]
not
in
[
a
.
get
(
'name'
,
None
)
for
a
in
role_versions
]:
if
role_versions
and
role
[
"version"
]
not
in
[
a
.
get
(
'name'
,
None
)
for
a
in
role_versions
]:
print
"The specified version (
%
s) was not found in the list of available versions."
%
role
.
version
print
"The specified version (
%
s) was not found in the list of available versions."
%
role
.
version
...
...
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