Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format fixes to output from fetch #596

Merged
merged 1 commit into from
Jul 16, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/ansible/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def on_unreachable(self, host, msg):

def on_failed(self, host, results):

print "failed: [%s] => %s\n" % (host, utils.jsonify(results))
print "failed: [%s] => %s" % (host, utils.jsonify(results))

def on_ok(self, host, host_result):

Expand All @@ -264,11 +264,11 @@ def on_ok(self, host, host_result):

def on_error(self, host, err):

print >>sys.stderr, "err: [%s] => %s\n" % (host, err)
print >>sys.stderr, "err: [%s] => %s" % (host, err)

def on_skipped(self, host):

print "skipping: [%s]\n" % host
print "skipping: [%s]" % host

def on_no_hosts(self):

Expand Down
6 changes: 3 additions & 3 deletions lib/ansible/runner/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ def _execute_fetch(self, conn, tmp):
remote_md5 = self._remote_md5(conn, tmp, source)

if remote_md5 == '0':
result = dict(msg="missing remote file: %s" % source, changed=False)
result = dict(msg="missing remote file", file=source, changed=False)
return ReturnData(host=conn.host, result=result)
elif remote_md5 != local_md5:
# create the containing directories, if needed
Expand All @@ -433,12 +433,12 @@ def _execute_fetch(self, conn, tmp):
conn.fetch_file(source, dest)
new_md5 = utils.md5(dest)
if new_md5 != remote_md5:
result = dict(failed=True, msg="md5 mismatch", md5sum=new_md5)
result = dict(failed=True, md5sum=new_md5, msg="md5 mismatch", file=source)
return ReturnData(host=conn.host, result=result)
result = dict(changed=True, md5sum=new_md5)
return ReturnData(host=conn.host, result=result)
else:
result = dict(changed=False, md5sum=local_md5)
result = dict(changed=False, md5sum=local_md5, file=source)
return ReturnData(host=conn.host, result=result)


Expand Down