add correct user on remote

This commit is contained in:
Nana Janashia
2021-04-03 18:05:00 +02:00
parent 610c123802
commit 533c4ba7da

View File

@@ -9,7 +9,8 @@ pipeline {
script {
echo "copying ansible folder to ansible server"
sshagent(['ansible-server-key']) {
sh "scp -o StrictHostKeyChecking=no ansible/ansible.cfg ${ANSIBLE_SERVER}:/root"
// ${ANSIBLE_SERVER}:/root without root will give jenkins@${ANSIBLE_SERVER}:/root
sh "scp -o StrictHostKeyChecking=no ansible/ansible.cfg root@${ANSIBLE_SERVER}:/root"
}
}
}