This commit is contained in:
Nana Janashia
2021-04-03 15:07:22 +02:00
parent a9a8f554e8
commit c727d27e81

View File

@@ -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"
}