Execute ansible command remotely
This commit is contained in:
1 parent
c70bfe4bbd
commit
3208a0e63e
1 file changed
+1
-2
Vendored
+1
-2
@@ -27,8 +27,7 @@ pipeline {
|
|||||||
withCredentials([sshUserPrivateKey(credentialsId: 'ansible-server-key', keyFileVariable: 'keyfile', usernameVariable: 'user')]){
|
withCredentials([sshUserPrivateKey(credentialsId: 'ansible-server-key', keyFileVariable: 'keyfile', usernameVariable: 'user')]){
|
||||||
remote.user = user
|
remote.user = user
|
||||||
remote.identityFile = keyfile
|
remote.identityFile = keyfile
|
||||||
sshCommand remote: remote, command: "ls -l"
|
sshCommand remote: remote, command: "ansible-playbook my-playbook.yaml"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user