copy module suggestions

Hi everyone,

I have two suggestions for the copy module:

  1. Often times I have to copy a file for the sole purpose of running a command on it, for example copying a .deb package or .tar.gz file and then installing it. The file is only needed temporarily. Currently, I need to create the target directory, copy the file, run the command, only_if the file has changed, remove it, etc. Would it make sense to wrap all this up in a kind of “command_with_file” module?

  2. Is it true that the copy module always copies the file over before running md5 to see if it is actually necessary to transfer over? This won’t scale very well for me for large files/large deployments. Is it possible to tweak this behavior?

Let me know what you think.

Thanks!

  • Oren

Hi everyone,

I have two suggestions for the copy module:

1. Often times I have to copy a file for the sole purpose of running a
command on it, for example copying a .deb package or .tar.gz file and then
installing it. The file is only needed temporarily. Currently, I need to
create the target directory, copy the file, run the command, only_if the
file has changed, remove it, etc. Would it make sense to wrap all this up in
a kind of "command_with_file" module?

Sounds a little confusing

but it might be nice to have something like an 'on_success' notify
that could delete files.

2. Is it true that the copy module always copies the file over before
running md5 to see if it is actually necessary to transfer over? This won't
scale very well for me for large files/large deployments. Is it possible to
tweak this behavior?

it's not true