Maintain file timestamp during copy

This seems to be a dangerous idea, as it would cover up the last
modified time of the file.

You should just check to see that the file md5sums are the same.

Ansible will already not transfer the file if it does not need to be replaced.

IMHO this is standard sysadmin practice, via "cp -p" or "scp -p ..." or "rsync -a..." and so on. It doesn't seem unreasonable to expect a similar capability in ansible.

-VK

Unless I am reading the docs wrong, rsync -t (part of -a) preserves
timestamps of **unchanged** files.

scp -p is something I don't use, and it's the first time I've received
this request. Not to say "new requests are bad", but "thousands of
users and not received this request" is at least significant :slight_smile:

My logic was this -- if someone had manually edited it, and then the
file is edited from the config system, you'd lose that record, which
means the user might be rather confused.

Conversation to the contrary is welcome, of course, though I think the
role of a config & deployment system is not the same as the role of
low level shell tools.

I'd also be curious if anyone else agrees with me.

I'm willing to accept this, but I want to understand the underlying
reason for this first.

(To clarify, I'm willing to accept this as something like a global
option, but not the default, and not as a per template or copy
parameter)