Edit .gitlab-ci.yml

This commit is contained in:
Leo
2026-09-12 05:36:51 +00:00
parent ee325adc5e
commit 78db08e953
+2
View File
@@ -30,8 +30,10 @@ deploy_to_server:
variables: variables:
ANSIBLE_HOST_KEY_CHECKING: "False" ANSIBLE_HOST_KEY_CHECKING: "False"
before_script: before_script:
- eval $(ssh-agent -s)
- echo "$ANSIBLE_PRIVATE_KEY" > ./deploy_key - echo "$ANSIBLE_PRIVATE_KEY" > ./deploy_key
- chmod 600 ./deploy_key - chmod 600 ./deploy_key
- ssh-add ./deploy_key
script: script:
- cd auto-deployment/ - cd auto-deployment/
- ansible-playbook -i inventory.ini A_deploy.yml --private-key=./deploy_key - ansible-playbook -i inventory.ini A_deploy.yml --private-key=./deploy_key