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
e7c0b950
Commit
e7c0b950
authored
Aug 21, 2014
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Work in progress on bin/ansible-galaxy changes testing.
parent
12ad1102
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
+8
-1
bin/ansible-galaxy
+8
-1
No files found.
bin/ansible-galaxy
View file @
e7c0b950
...
@@ -41,6 +41,7 @@ from optparse import OptionParser
...
@@ -41,6 +41,7 @@ from optparse import OptionParser
import
ansible.constants
as
C
import
ansible.constants
as
C
import
ansible.utils
import
ansible.utils
from
ansible.errors
import
AnsibleError
default_meta_template
=
"""---
default_meta_template
=
"""---
galaxy_info:
galaxy_info:
...
@@ -342,7 +343,10 @@ def scm_archive_role(scm, role_url, role_version, role_name):
...
@@ -342,7 +343,10 @@ def scm_archive_role(scm, role_url, role_version, role_name):
tempdir
=
tempfile
.
mkdtemp
()
tempdir
=
tempfile
.
mkdtemp
()
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
:
popen
=
subprocess
.
Popen
(
clone_cmd
,
cwd
=
tempdir
,
stdout
=
devnull
,
stderr
=
devnull
)
try
:
popen
=
subprocess
.
Popen
(
clone_cmd
,
cwd
=
tempdir
,
stdout
=
devnull
,
stderr
=
devnull
)
except
:
raise
AnsibleError
(
"error executing:
%
s"
%
" "
.
join
(
clone_cmd
))
rc
=
popen
.
wait
()
rc
=
popen
.
wait
()
if
rc
!=
0
:
if
rc
!=
0
:
print
"Command
%
s failed"
%
' '
.
join
(
clone_cmd
)
print
"Command
%
s failed"
%
' '
.
join
(
clone_cmd
)
...
@@ -490,6 +494,9 @@ def fetch_role(role_name, target, role_data, options):
...
@@ -490,6 +494,9 @@ def fetch_role(role_name, target, role_data, options):
def
install_role
(
role_name
,
role_version
,
role_filename
,
options
):
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
...
...
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