From 3208a0e63ebb230db86313aa1e1c4dd20c10c6ba Mon Sep 17 00:00:00 2001 From: Nana Janashia Date: Wed, 7 Apr 2021 11:59:04 +0200 Subject: [PATCH] Execute ansible command remotely --- Jenkinsfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7a06bdd..e8c5ae2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,8 +27,7 @@ pipeline { withCredentials([sshUserPrivateKey(credentialsId: 'ansible-server-key', keyFileVariable: 'keyfile', usernameVariable: 'user')]){ remote.user = user remote.identityFile = keyfile - sshCommand remote: remote, command: "ls -l" - + sshCommand remote: remote, command: "ansible-playbook my-playbook.yaml" } } }