mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-06-29 23:49:09 +00:00
Add winrm integration tests for raw, script and ping modules.
This commit is contained in:
parent
fa0943a9b3
commit
0c938562a7
11 changed files with 241 additions and 0 deletions
|
|
@ -0,0 +1,2 @@
|
|||
@ECHO OFF
|
||||
ECHO We can even run a batch file!
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
# Test script to make sure the Ansible script module works.
|
||||
Write-Host "Woohoo! We can run a PowerShell script via Ansible!"
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
# Test script to make sure the Ansible script module works when arguments are
|
||||
# passed to the script.
|
||||
|
||||
foreach ($i in $args)
|
||||
{
|
||||
Write-Host $i;
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
# http://stackoverflow.com/questions/9948517/how-to-stop-a-powershell-script-on-the-first-error
|
||||
#$ErrorActionPreference = "Stop";
|
||||
# http://stackoverflow.com/questions/15777492/why-are-my-powershell-exit-codes-always-0
|
||||
|
||||
trap
|
||||
{
|
||||
Write-Error -ErrorRecord $_
|
||||
exit 1;
|
||||
}
|
||||
|
||||
throw "Oh noes I has an error"
|
||||
Loading…
Add table
Add a link
Reference in a new issue