From 78fbc1f580d06ad2ce992c8f2d5940e4044dd287 Mon Sep 17 00:00:00 2001 From: Nana Janashia Date: Sat, 3 Apr 2021 18:31:42 +0200 Subject: [PATCH] Add playbook execution --- Jenkinsfile-v1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile-v1 b/Jenkinsfile-v1 index fdb8ec2..490368f 100644 --- a/Jenkinsfile-v1 +++ b/Jenkinsfile-v1 @@ -14,7 +14,7 @@ pipeline { echo "copying ssh keys for ec2 instances" withCredentials([sshUserPrivateKey(credentialsId: 'ec2-server-key', keyFileVariable: 'keyfile', usernameVariable: 'user')]) { - sh 'scp $keyfile root@$ANSIBLE_SERVER:/root/key.pem' + sh 'scp $keyfile root@$ANSIBLE_SERVER:/root/ssh-key.pem' } } } @@ -35,6 +35,7 @@ pipeline { remote.user = user sshCommand remote: remote, command: "ls -l" + sshCommand remote: remote, command: "ansible-playbook docker-and-compose.yaml" } } }