infrastructure/.drone.yml
Tobias Manske a5b54b5982
All checks were successful
continuous-integration/drone/push Build is passing
CI: run ansible-playbook --check to assure idempotency
2022-09-30 22:27:04 +02:00

47 lines
1007 B
YAML

---
kind: pipeline
type: docker
name: Ansible-Playbook
trigger:
branch:
- main
event:
include:
- push
- custom
node:
ansible: true
steps:
- name: Run Ansible
image: registry.tobiasmanske.de/ansible-runner:latest
pull: always
commands:
- cd coreos-config
- ansible-playbook --private-key /ssh_key --inventory=inventory.yaml playbook.yaml
- name: Validate Ansible
image: registry.tobiasmanske.de/ansible-runner:latest
pull: always
commands:
- cd coreos-config
- ansible-playbook --check --private-key /ssh_key --inventory=inventory.yaml playbook.yaml
- name: Notify Discord
when:
status:
- failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
message: >
{{repo.name}}
Deployment {{build.number}} failed!
{{build.link}}
image_pull_secrets:
- registry