Commit 08c1f96e by Michael DeHaan

Fix some subtle behavior of how the get_url module chains into the file module,…

Fix some subtle behavior of how the get_url module chains into the file 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)
parent 7e9e2901
...@@ -587,9 +587,9 @@ class Runner(object): ...@@ -587,9 +587,9 @@ class Runner(object):
changed = False changed = False
if result.result.get('changed',False) or result2.result.get('changed',False): if result.result.get('changed',False) or result2.result.get('changed',False):
changed = True changed = True
result2.result.update(result.result) result.result.update(result2.result)
result2.result['changed'] = changed result.result['changed'] = changed
result = result2
del result.result['daisychain'] del result.result['daisychain']
self._delete_remote_files(conn, tmp) self._delete_remote_files(conn, tmp)
......
...@@ -64,6 +64,8 @@ def url_do_get(module, url, dest): ...@@ -64,6 +64,8 @@ def url_do_get(module, url, dest):
else: else:
actualdest = dest actualdest = dest
info['daisychain_args'] = module.params info['daisychain_args'] = module.params
info['daisychain_args']['state'] = 'file'
info['daisychain_args']['dest'] = actualdest
info['actualdest'] = actualdest info['actualdest'] = actualdest
request = urllib2.Request(url) request = urllib2.Request(url)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment