Skip to content
Snippets Groups Projects
Commit 1cb260a8 authored by Sven Marcus's avatar Sven Marcus
Browse files

Save private key to file and use it from playbook

parent 5abd3795
No related branches found
No related tags found
No related merge requests found
...@@ -75,10 +75,11 @@ deploy_to_phoenix: ...@@ -75,10 +75,11 @@ deploy_to_phoenix:
- chmod 700 ~/.ssh - chmod 700 ~/.ssh
- eval $(ssh-agent -s) - eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- echo $SSH_PRIVATE_KEY >> ansible/private_key
- pip3 install ansible - pip3 install ansible
script: script:
- ansible-playbook -i ansible/hosts.cfg -u $REMOTE_USER ansible/playbook.yml -vvvv - ansible-playbook -i ansible/hosts.cfg -u $REMOTE_USER ansible/playbook.yml
parallel: parallel:
matrix: matrix:
......
[targets] [gitlab_ci_deploy_targets]
phoenix.hlr.rz.tu-bs.de phoenix.hlr.rz.tu-bs.de ansible_ssh_private_key_file=./private_key
\ No newline at end of file \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment