Tobias Manske
0bdaa53bcd
All checks were successful
continuous-integration/drone/push Build is passing
47 lines
1.0 KiB
YAML
47 lines
1.0 KiB
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 --limit host.nc.chaoswg.org --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 --limit host.nc.chaoswg.org --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
|