mirror of https://github.com/ansible/ansible.git
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.
18 lines
374 B
PowerShell
18 lines
374 B
PowerShell
11 years ago
|
#!powershell
|
||
|
# WANT_JSON
|
||
|
|
||
|
If ($args.Length -gt 0)
|
||
|
{
|
||
|
$params = Get-Content $args[0] | ConvertFrom-Json;
|
||
|
}
|
||
|
|
||
|
$data = 'pong';
|
||
|
If (($params | Get-Member | Select-Object -ExpandProperty Name) -contains 'data')
|
||
|
{
|
||
|
$data = $params.data;
|
||
|
}
|
||
|
|
||
|
$result = '{}' | ConvertFrom-Json;
|
||
|
$result | Add-Member -MemberType NoteProperty -Name ping -Value $data;
|
||
|
echo $result | ConvertTo-Json;
|