Files
java-maven-app/Jenkinsfile-v1
Nana Janashia d6fd074273 Fix
2021-04-03 14:19:10 +02:00

40 lines
1.2 KiB
Plaintext

pipeline {
agent any
stages {
stage("copy playbook to ansible-server") {
steps {
script {
echo "copying ansible folder to ansible server"
}
}
}
stage("copy ssh keys for Ansible") {
steps {
script {
echo "copying ssh keys for ec2 instances"
}
}
}
stage("execute ansible playbook from the ansible-server") {
steps {
script {
echo "executing ansible-playbook"
def remote = [:]
remote.host = "157.230.120.252"
remote.user = "root"
remote.allowAnyHosts = true
withCredentials([sshUserPrivateKey(credentialsId: 'ansible-server-key')]) {
stage('Remote SSH') {
sshCommand remote: remote, command: "ls -l"
}
}
}
}
}
}
}