Thanks for this. I guess the integration tests can't be covering this
then... Another thing for me to look at while the v2 work progresses.
On Monday, January 5, 2015 7:49:50 PM UTC, Joey wrote:
>
> I know this has been backed out of devel, but I need windows template
> support and it was so close to working for me that I decided to fix the few
> issues I found and keep using the branch I was on. In case this is useful
> for the future or for anyone else:
>
> ansible/lib/ansible/module_utils/powershell.ps1: Get-FileChecksum needs an
> update from this:
> [System.BitConverter]::ToString($sp.ComputeHash($fp)).Replace("-", "").
> ToLower();
> to this:
> $hash = [System.BitConverter]::ToString($sp.ComputeHash($fp)).Replace("-",
> "").ToLower();
>
> Otherwise it returns an array instead of a string, and win_copy will not
> be able to compare the two checksums correctly.
>
>
> I also changed ansible/lib/ansible/modules/core/windows/win_copy.ps1 and
> updated:
> $src_checksum.CompareTo($dest_checksum)
> to:
> $src_checksum.Equals($dest_checksum)
> as apparently Microsoft recommends using CompareTo for sorting, not for
> checking equality, and I was getting some overload errors when CompareTo
> kept running into the array from Get-FileChecksum.
>
>
--
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/33fe54ef-18ce-4eaf-b084-65d244250c11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.