Add optional step of preparing ansible server

This commit is contained in:
Nana Janashia
2021-04-07 12:10:30 +02:00
parent 3b6780360c
commit 45e509506b
2 changed files with 7 additions and 0 deletions

1
Jenkinsfile vendored
View File

@@ -30,6 +30,7 @@ pipeline {
withCredentials([sshUserPrivateKey(credentialsId: 'ansible-server-key', keyFileVariable: 'keyfile', usernameVariable: 'user')]){
remote.user = user
remote.identityFile = keyfile
sshScript remote: remote, script: "prepare-ansible-server.sh"
sshCommand remote: remote, command: "ansible-playbook my-playbook.yaml"
}
}