feat: add ansible playbook to deploy caddy to valhalla.vxm.cz
This commit is contained in:
parent
722dd43330
commit
dfb7075138
3 changed files with 61 additions and 0 deletions
|
|
@ -16,3 +16,17 @@ build:
|
|||
artifacts:
|
||||
paths:
|
||||
- /build/caddy
|
||||
|
||||
deploy:
|
||||
stage: deploy
|
||||
image: alpine/ansible:latest
|
||||
before_script:
|
||||
- "command -v ssh-agent >/dev/null || ( apk update && apk add --no-cache openssh-client )"
|
||||
- eval $(ssh-agent -s)
|
||||
- chmod 400 "$SSH_PRIVATE_KEY"
|
||||
- ssh-add "$SSH_PRIVATE_KEY"
|
||||
- mkdir -p ~/.ssh
|
||||
- chmod 700 ~/.ssh
|
||||
- ssh-keyscan -H valhalla.vxm.cz >> ~/.ssh/known_hosts
|
||||
script:
|
||||
- ansible-playbook -i inventory.ini playbook.yml
|
||||
|
|
|
|||
Reference in a new issue