infrastructure/.drone.yml
Paul Brinkmeier 1b61394afd
All checks were successful
continuous-integration/drone/push Build is passing
Use vault password secret in CI
2023-01-27 04:59:29 +01:00

36 lines
931 B
YAML

---
kind: pipeline
type: docker
name: Static Verification
steps:
- name: ansible-lint
image: python:3.10.6
commands:
- pip install ansible==6.4.0 ansible-lint==6.4.0 > /dev/null 2> /dev/null
- ansible-lint ansible
---
kind: pipeline
type: docker
name: Check
steps:
- name: ansible-playbook --check
image: python:3.10.6
environment:
SSH_KEY:
from_secret: ssh_key
VAULT_PASSWORD:
from_secret: vault_password
commands:
- pip install ansible==6.4.0 > /dev/null 2> /dev/null
- mkdir "$HOME/.ssh"
- echo "$SSH_KEY" > "$HOME/.ssh/id"
- chmod 0600 ~/.ssh/id
- ssh-keyscan -p 2309 vmd98928.contaboserver.net > "$HOME/.ssh/known_hosts"
- echo "$VAULT_PASSWORD" > "$HOME/vault_password"
- cd ansible
- ansible-playbook --private-key "$HOME/.ssh/id" --vault-password-file "$HOME/vault_password" --check playbooks/misc-all.yaml