Hi Michael, Thank you for the answer!
Perhaps it would be good to mention the unavailability of diff in recursive copy at http://docs.ansible.com/copy_module.html? For us diff is quite an important feature because we actually do not have control over our prod environment (contrary to staging) so we want to use Ansible to configure our staging and then to check if the production is different or not. There are no other tools I would know of that are capable of a recursive diff. What I would typically do is run Ansible with -C, without -diff; if there are any changes, I would run it with --diff for a particular node to find out what the hosting company has screwed up. I have currently worked our this limitation by using copy with with_fileglob for each of the sub(dirs) (fortunately there are only few). But it would be great if Ansible eventually got support for diffs on recursive copies. Best regards, Jakub Holy On Thursday, March 6, 2014 6:11:59 PM UTC+1, Michael DeHaan wrote: > > The diff stuff is really only intended on basic things in the first > implementation, the addition made to recursive copy didn't really feel the > need to support the diff mode. > > To be honest, if you have more than one system, --diff gets ugly pretty > quick. I've been tempted to cull it at times -- while a great feature > that I do appreciate the addition of, it is *quite* involved in the way it > works, so there's a bit more than usual maintaince cost to it, and this is > one of those things. > > It's not really it's fault, but more of a case of there being a LOT of > data. > > I'm open to improvements, though I will say that we might be a little > hesistant about them due to lots of important magic involved. Copy is > pretty mission critical. > > > > > > > On Wed, Mar 5, 2014 at 7:06 AM, Jakub Holy <[email protected] <javascript:> > > wrote: > >> Hello, >> >> using Ansible 1.5 and recursively copying a directory, I expect to see >> detailed diff of the individual changed files when running with "-C --diff" >> but I only get informed that the top directory has changed. Is that >> correct? Is there a feature request to make --diff during a recursive copy >> work as it does for a file copy, i.e. to show diff of each file changed? >> Are there plan to implement this in the near future? >> >> (It is slightly better with synchronize that uses >> rsync's --itemize-changes and at least shows what has hcanged - size, >> checksum, timestamp, ... - but not the diff.) >> >> Thank you! >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ansible Project" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected]<javascript:> >> . >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/8a99740f-93c7-4236-ba07-ed50f375591e%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/8a99740f-93c7-4236-ba07-ed50f375591e%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/04e5fcd9-7e1e-426c-b8d0-d29ee64cd7c0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
