Debian Codegraph @

test/support/windows-integration/plugins/modules/win_ping.ps1

raw
1 #!powershell
2
3 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
4
5 #AnsibleRequires -CSharpUtil Ansible.Basic
6
7 $spec = @{
8 options = @{
9 data = @{ type = "str"; default = "pong" }
10 }
11 supports_check_mode = $true
12 }
13 $module = [Ansible.Basic.AnsibleModule]::Create($args, $spec)
14 $data = $module.Params.data
15
16 if ($data -eq "crash") {
17 throw "boom"
18 }
19
20 $module.Result.ping = $data
21 $module.ExitJson()