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 0000000000..9b427145b0 --- /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 84dad687c0..c3a88d5a8e 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 3cf064d841..ac6b41f473 100644 --- a/test/sanity/pslint/ignore.txt +++ b/test/sanity/pslint/ignore.txt @@ -100,7 +100,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