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