Fix
This commit is contained in:
@@ -26,11 +26,11 @@ pipeline {
|
||||
def remote = [:]
|
||||
remote.name = "ansible-server"
|
||||
remote.host = "157.230.120.252"
|
||||
remote.user = "root"
|
||||
remote.allowAnyHosts = true
|
||||
|
||||
withCredentials([sshUserPrivateKey(credentialsId: 'ansible-server-key', keyFileVariable: 'identity')]) {
|
||||
withCredentials([sshUserPrivateKey(credentialsId: 'ansible-server-key', keyFileVariable: 'identity', usernameVariable: 'user')]) {
|
||||
remote.identityFile = identity
|
||||
remote.user = user
|
||||
stage('Remote SSH') {
|
||||
sshCommand remote: remote, command: "ls -l"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user