From 74a4e8989b58d3ee9c2260adb2f44e559434746c Mon Sep 17 00:00:00 2001 From: Sven Marcus <s.marcus@outlook.de> Date: Fri, 23 Oct 2020 14:21:35 +0200 Subject: [PATCH] Uses SSH_PRIVATE_KEY in .gitlab-ci --- .gitlab-ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 089e80239..62c367b52 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -73,13 +73,11 @@ deploy_to_phoenix: needs: ["build"] before_script: + - eval "$(ssh-agent -s)" + - ssh-add $SSH_PRIVATE_KEY - pip3 install ansible script: - - ls -l /root/.ssh - - chmod 600 /root/.ssh/config - - chown root /root/.ssh/config - - ls -l /root/.ssh - ansible-playbook -i ansible/hosts.cfg ansible/playbook.yml -u $REMOTE_USER parallel: -- GitLab