diff --git a/changelogs/fragments/57093-win_pagefile-Bug-not-using-testPath.yml b/changelogs/fragments/57093-win_pagefile-Bug-not-using-testPath.yml new file mode 100644 index 00000000000..9b427145b07 --- /dev/null +++ b/changelogs/fragments/57093-win_pagefile-Bug-not-using-testPath.yml @@ -0,0 +1,2 @@ +bugfixes: + - "win_pagefile - not using testPath" \ No newline at end of file diff --git a/lib/ansible/modules/windows/win_pagefile.ps1 b/lib/ansible/modules/windows/win_pagefile.ps1 index 84dad687c04..c3a88d5a8ee 100644 --- a/lib/ansible/modules/windows/win_pagefile.ps1 +++ b/lib/ansible/modules/windows/win_pagefile.ps1 @@ -91,7 +91,7 @@ if ($state -eq "absent") { } # Make sure drive is accessible - if (($test_path) -and (-not (Test-Path "${drive}:"))) { + if (($testPath) -and (-not (Test-Path "${drive}:"))) { Fail-Json $result "Unable to access '${drive}:' drive" } diff --git a/test/sanity/pslint/ignore.txt b/test/sanity/pslint/ignore.txt index 44649ab595e..6513a050b01 100644 --- a/test/sanity/pslint/ignore.txt +++ b/test/sanity/pslint/ignore.txt @@ -99,7 +99,6 @@ lib/ansible/modules/windows/win_pagefile.ps1 PSAvoidUsingCmdletAliases lib/ansible/modules/windows/win_pagefile.ps1 PSAvoidUsingPositionalParameters lib/ansible/modules/windows/win_pagefile.ps1 PSAvoidUsingWMICmdlet lib/ansible/modules/windows/win_pagefile.ps1 PSCustomUseLiteralPath -lib/ansible/modules/windows/win_pagefile.ps1 PSUseDeclaredVarsMoreThanAssignments lib/ansible/modules/windows/win_pagefile.ps1 PSUseSupportsShouldProcess lib/ansible/modules/windows/win_pester.ps1 PSCustomUseLiteralPath lib/ansible/modules/windows/win_product_facts.ps1 PSAvoidTrailingWhitespace