mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Migrate Windows CI roles to test targets. (#18005)
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
@ECHO OFF
|
||||
ECHO We can even run a batch file!
|
||||
@@ -0,0 +1,2 @@
|
||||
@ECHO OFF
|
||||
ECHO We can even run a batch file with cmd extension!
|
||||
@@ -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,6 @@
|
||||
Param(
|
||||
[bool]$boolvariable
|
||||
)
|
||||
|
||||
Write-Host $boolvariable.GetType()
|
||||
Write-Host $boolvariable
|
||||
@@ -0,0 +1,3 @@
|
||||
# Test script to create a file.
|
||||
|
||||
echo $null > $args[0]
|
||||
@@ -0,0 +1,3 @@
|
||||
# Test script to remove a file.
|
||||
|
||||
Remove-Item $args[0] -Force
|
||||
@@ -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,9 @@
|
||||
# Test script to make sure we handle non-zero exit codes.
|
||||
|
||||
trap
|
||||
{
|
||||
Write-Error -ErrorRecord $_
|
||||
exit 1;
|
||||
}
|
||||
|
||||
throw "Oh noes I has an error"
|
||||
@@ -0,0 +1,6 @@
|
||||
# Test script to make sure the Ansible script module works when arguments are
|
||||
# passed via splatting (http://technet.microsoft.com/en-us/magazine/gg675931.aspx)
|
||||
|
||||
Write-Host $args.This
|
||||
Write-Host $args.That
|
||||
Write-Host $args.Other
|
||||
Reference in New Issue
Block a user