| Server IP : 38.180.95.123 / Your IP : 216.73.216.230 Web Server : nginx/1.28.2 System : Linux v970193243.local 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : playbazecasino.com ( 1013) PHP Version : 8.4.23 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/ansible/module_utils/powershell/ |
Upload File : |
# Copyright (c) 2017 Ansible Project
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
# used by Convert-DictToSnakeCase to convert a string in camelCase
# format to snake_case
Function Convert-StringToSnakeCase($string) {
# cope with pluralized abbreaviations such as TargetGroupARNs
if ($string -cmatch "[A-Z]{3,}s") {
$replacement_string = $string -creplace $matches[0], "_$($matches[0].ToLower())"
# handle when there was nothing before the plural pattern
if ($replacement_string.StartsWith("_") -and -not $string.StartsWith("_")) {
$replacement_string = $replacement_string.Substring(1)
}
$string = $replacement_string
}
$string = $string -creplace "(.)([A-Z][a-z]+)", '$1_$2'
$string = $string -creplace "([a-z0-9])([A-Z])", '$1_$2'
$string = $string.ToLower()
return $string
}
# used by Convert-DictToSnakeCase to covert list entries from camelCase
# to snake_case
Function Convert-ListToSnakeCase($list) {
$snake_list = [System.Collections.ArrayList]@()
foreach ($value in $list) {
if ($value -is [Hashtable]) {
$new_value = Convert-DictToSnakeCase -dict $value
}
elseif ($value -is [Array] -or $value -is [System.Collections.ArrayList]) {
$new_value = Convert-ListToSnakeCase -list $value
}
else {
$new_value = $value
}
[void]$snake_list.Add($new_value)
}
return , $snake_list
}
# converts a dict/hashtable keys from camelCase to snake_case
# this is to keep the return values consistent with the Ansible
# way of working.
Function Convert-DictToSnakeCase($dict) {
$snake_dict = @{}
foreach ($dict_entry in $dict.GetEnumerator()) {
$key = $dict_entry.Key
$snake_key = Convert-StringToSnakeCase -string $key
$value = $dict_entry.Value
if ($value -is [Hashtable]) {
$snake_dict.$snake_key = Convert-DictToSnakeCase -dict $value
}
elseif ($value -is [Array] -or $value -is [System.Collections.ArrayList]) {
$snake_dict.$snake_key = Convert-ListToSnakeCase -list $value
}
else {
$snake_dict.$snake_key = $value
}
}
return , $snake_dict
}
# this line must stay at the bottom to ensure all defined module parts are exported
Export-ModuleMember -Alias * -Function * -Cmdlet *