summaryrefslogtreecommitdiff
path: root/bin/ansible-galaxy
diff options
context:
space:
mode:
authorMichael DeHaan <michael.dehaan@gmail.com>2014-08-21 18:24:40 -0400
committerMichael DeHaan <michael.dehaan@gmail.com>2014-08-21 18:24:40 -0400
commit2e95e21cadba2d09be56e29f561592ce680c2bf1 (patch)
tree4b3268f50fb3596c3a5802315f32dd45b1dfa56c /bin/ansible-galaxy
parent56ce56fdbe51590f0631f0d7eb1d3528099c0bec (diff)
downloadansible-2e95e21cadba2d09be56e29f561592ce680c2bf1.tar.gz
Remove some debug in ansible-galaxy upgrades, one of which raises errors down some code paths.
Diffstat (limited to 'bin/ansible-galaxy')
-rwxr-xr-xbin/ansible-galaxy13
1 files changed, 6 insertions, 7 deletions
diff --git a/bin/ansible-galaxy b/bin/ansible-galaxy
index 3d1e53e730..0a51a4b63e 100755
--- a/bin/ansible-galaxy
+++ b/bin/ansible-galaxy
@@ -344,13 +344,14 @@ def scm_archive_role(scm, role_url, role_version, role_name):
clone_cmd = [scm, 'clone', role_url, role_name]
with open('/dev/null', 'w') as devnull:
try:
+ print "- executing: %s" % " ".join(clone_cmd)
popen = subprocess.Popen(clone_cmd, cwd=tempdir, stdout=devnull, stderr=devnull)
except:
raise AnsibleError("error executing: %s" % " ".join(clone_cmd))
rc = popen.wait()
if rc != 0:
- print "Command %s failed" % ' '.join(clone_cmd)
- print "in directory %s" % tempdir
+ print "- command %s failed" % ' '.join(clone_cmd)
+ print " in directory %s" % tempdir
return False
temp_file = tempfile.NamedTemporaryFile(delete=False, suffix='.tar')
@@ -367,12 +368,13 @@ def scm_archive_role(scm, role_url, role_version, role_name):
archive_cmd.append('HEAD')
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),
stderr=devnull, stdout=devnull)
rc = popen.wait()
if rc != 0:
- print "Command %s failed" % ' '.join(archive_cmd)
- print "in directory %s" % tempdir
+ print "- command %s failed" % ' '.join(archive_cmd)
+ print " in directory %s" % tempdir
return False
shutil.rmtree(tempdir)
@@ -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
# to the specified (or default) roles directory
- print "DEBUG: FN=%s" % role_filename
-
if not tarfile.is_tarfile(role_filename):
print "Error: the file downloaded was not a tar.gz"
return False
@@ -759,7 +759,6 @@ def execute_install(args, options, parser):
role["version"] = str(loose_versions[-1])
else:
role["version"] = 'master'
- print " no version specified, installing %s" % role.version
else:
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