You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/module_utils_Ansible.Module.../library/testlist.ps1

13 lines
309 B
PowerShell

#powershell
#Requires -Module Ansible.ModuleUtils.Legacy
$params = Parse-Args $args
$value = Get-AnsibleParam -Obj $params -Name value -Type list
if ($value -isnot [array]) {
Fail-Json -obj @{} -message "value was not a list but was $($value.GetType().FullName)"
}
Exit-Json @{ count = $value.Count }