ansible/ansible — pull request #891 by willthames (2012-08-17 03:09:49+00:00)
Title: Fix copying for more than one host. Fix md5 checks

When running the copy module with more than one host, the daisychaining
causes the copy module to be skipped for the second host and just the
file module to be run, which causes an error.

Here I preserve the module_name and module_args at the start of
`_executor_internal_inner` and restore it after daisychaining. Better
solutions may exist. This only stopped working in the last couple of days
but I see nothing in the history that might cause it.

One other fix is that md5sum prints the filename after the checksum. This
means that the md5 comparison will always fail as we're comparing a checksum
to a checksum + filename. I've used cut to trim this at the remote end.