From 1ec115d830a636782b6b7f737ec054809157df50 Mon Sep 17 00:00:00 2001 From: jhawkesworth Date: Tue, 27 Jun 2017 00:51:50 +0100 Subject: [PATCH] win_regedit: Make the string comparison case sensitive when comparing string values (#25536) * Make the string comparison case sensitive when comparing string values * Added documentation note about change detection now being case-sensitive --- lib/ansible/modules/windows/win_regedit.ps1 | 2 +- lib/ansible/modules/windows/win_regedit.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/windows/win_regedit.ps1 b/lib/ansible/modules/windows/win_regedit.ps1 index e558ad0e3a5..07dcf1bc9a4 100644 --- a/lib/ansible/modules/windows/win_regedit.ps1 +++ b/lib/ansible/modules/windows/win_regedit.ps1 @@ -83,7 +83,7 @@ Function Compare-Data { return $false } } elseif ($ReferenceData -is [string] -or $ReferenceData -is [int]) { - if ($ReferenceData -eq $DifferenceData) { + if ($ReferenceData -ceq $DifferenceData) { return $true } else { return $false diff --git a/lib/ansible/modules/windows/win_regedit.py b/lib/ansible/modules/windows/win_regedit.py index 5f73f568ee1..d1bedd469b7 100644 --- a/lib/ansible/modules/windows/win_regedit.py +++ b/lib/ansible/modules/windows/win_regedit.py @@ -76,6 +76,7 @@ notes: - Check-mode C(-C/--check) and diff output C(-D/--diff) are supported, so that you can test every change against the active configuration before applying changes. - Beware that some registry hives (C(HKEY_USERS) in particular) do not allow to create new registry paths. +- Since ansible 2.4, when checking if a string registry value has changed, a case-sensitive test is used. Previously the test was case-insensitive. author: "Adam Keech (@smadam813), Josh Ludwig (@joshludwig)" '''