Skip to content

Commit

Permalink
Fix some subtle behavior of how the get_url module chains into the fi…
Browse files Browse the repository at this point in the history
…le module, plus blend the results of daisy chain

operations in the correct order, so the file module results overlay the original module results, not the other way
around (which keeps any failure msg's intact)
  • Loading branch information
mpdehaan committed Aug 3, 2012
1 parent 7e9e290 commit 08c1f96
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/ansible/runner/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,9 +587,9 @@ def _executor_internal_inner(self, host, inject, port, is_chained=False):
changed = False
if result.result.get('changed',False) or result2.result.get('changed',False):
changed = True
result2.result.update(result.result)
result2.result['changed'] = changed
result = result2
result.result.update(result2.result)
result.result['changed'] = changed

del result.result['daisychain']

self._delete_remote_files(conn, tmp)
Expand Down
2 changes: 2 additions & 0 deletions library/get_url
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ def url_do_get(module, url, dest):
else:
actualdest = dest
info['daisychain_args'] = module.params
info['daisychain_args']['state'] = 'file'
info['daisychain_args']['dest'] = actualdest
info['actualdest'] = actualdest

request = urllib2.Request(url)
Expand Down

0 comments on commit 08c1f96

Please sign in to comment.