Fix user var
This commit is contained in:
1 parent
8ae83c5555
commit
7a72b254ed
1 file changed
+3
-3
+3
-3
@@ -27,9 +27,9 @@ pipeline {
|
|||||||
remote.host = "157.230.120.252"
|
remote.host = "157.230.120.252"
|
||||||
remote.allowAnyHosts = true
|
remote.allowAnyHosts = true
|
||||||
|
|
||||||
withCredentials([sshUserPrivateKey(credentialsId: 'ansible-server-key', usernameVariable: 'user')]) {
|
withCredentials([sshUserPrivateKey(credentialsId: 'ansible-server-key')]) {
|
||||||
remote.user = user
|
remote.user = "root"
|
||||||
sshCommand remote: remote, command: "ls -lrt"
|
sshCommand remote: remote, command: "ls -l"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user