win_disk_facts - Set output array order to be by disk number property (#64997)
* win_disk_facts - Set output array order to be by disk number property - https://github.com/ansible/ansible/issues/63998 * Update win_disk_facts.ps1
This commit is contained in:
parent
d8982b4992
commit
03dce68227
2 changed files with 5 additions and 0 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
minor_changes:
|
||||||
|
- "win_disk_facts - Set output array order to be by disk number property - https://github.com/ansible/ansible/issues/63998"
|
|
@ -244,5 +244,8 @@ foreach ($disk in $disks) {
|
||||||
$result.ansible_facts.ansible_disks += $disk_info
|
$result.ansible_facts.ansible_disks += $disk_info
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Sort by disk number property
|
||||||
|
$result.ansible_facts.ansible_disks = @() + ($result.ansible_facts.ansible_disks | Sort-Object -Property {$_.Number})
|
||||||
|
|
||||||
# Return result
|
# Return result
|
||||||
Exit-Json -obj $result
|
Exit-Json -obj $result
|
||||||
|
|
Loading…
Reference in a new issue