diff options
author | Jordan Borean <jborean93@gmail.com> | 2019-11-13 04:34:45 +1000 |
---|---|---|
committer | Matt Davis <nitzmahone@users.noreply.github.com> | 2019-11-12 10:34:45 -0800 |
commit | dfa74b5c52097263e8aba6b1c887564454fd0e7a (patch) | |
tree | 24b77ae0f59d31b34e05c6d63f23d63e83f83d46 | |
parent | 436b2c44f6b6f3f49b064c42db752ce7358e632f (diff) | |
download | ansible-dfa74b5c52097263e8aba6b1c887564454fd0e7a.tar.gz |
change $partition variable name to $ansible_partition (#63968) (#64691)
* change $partition variable name to $ansbile_partition
* Added changelog fragment
(cherry picked from commit 8b13836b1f318ee00c6482e71bfbdb7a49bd75f3)
-rw-r--r-- | changelogs/fragments/win_partition-var.yaml | 2 | ||||
-rw-r--r-- | lib/ansible/modules/windows/win_partition.ps1 | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/changelogs/fragments/win_partition-var.yaml b/changelogs/fragments/win_partition-var.yaml new file mode 100644 index 0000000000..4a5dca8a97 --- /dev/null +++ b/changelogs/fragments/win_partition-var.yaml @@ -0,0 +1,2 @@ +bugfixes: +- win_partition - Fix invalid variable name causing a failure on checks - https://github.com/ansible/ansible/issues/62401 diff --git a/lib/ansible/modules/windows/win_partition.ps1 b/lib/ansible/modules/windows/win_partition.ps1 index 0b47674d89..3295c8e16c 100644 --- a/lib/ansible/modules/windows/win_partition.ps1 +++ b/lib/ansible/modules/windows/win_partition.ps1 @@ -219,10 +219,10 @@ if ($ansible_partition) { } else { - if ($null -ne $gpt_type -and $gpt_styles.$gpt_type -ne $partition.GptType) { + if ($null -ne $gpt_type -and $gpt_styles.$gpt_type -ne $ansible_partition.GptType) { $module.FailJson("gpt_type is not a valid parameter for existing partitions") } - if ($null -ne $mbr_type -and $mbr_styles.$mbr_type -ne $partition.MbrType) { + if ($null -ne $mbr_type -and $mbr_styles.$mbr_type -ne $ansible_partition.MbrType) { $module.FailJson("mbr_type is not a valid parameter for existing partitions") } |