successful windows ansible run fixed
This commit is contained in:
@ -22,26 +22,6 @@ 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 {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user