successful windows ansible run

This commit is contained in:
2025-10-26 03:40:12 -07:00
parent 7bcd51bdd4
commit 04373ff604
5 changed files with 47 additions and 14 deletions

View File

@ -22,6 +22,26 @@ pipeline {
stages {
stage('Powershell Test'){
steps {
script {
def remoteHost = '${params.host_ip}'
def powershellScript = '''
$username = "${env:ansible_service_windows_USR}"
$password = "${env:ansible_service_windows_PSW}"
Write-Host "Using username: $username and password: $password"
'''
bat """
echo Running PowerShell script on remote machine...
cmd /c powershell -Command "& { ${powershellScript} }"
"""
}
}
}
stage('Generate Inventory File') {
steps {