Files
bab-backend-ansible/rulebooks/gitea_webhook.yml
2023-12-30 00:06:35 -05:00

27 lines
629 B
YAML

---
- name: Listen for Gitea Webhooks
hosts: all
sources:
- name: Ansible webhook listener
ansible.eda.webhook:
port: 5000
host: 0.0.0.0
rules:
- name: Debug
condition:
all:
- event.payload.data.artifact_url is defined
action:
debug:
- name: Create facts
condition:
all:
- event.payload.data.artifact_url is defined
action:
run_job_template:
name: bab-deploy-application
organization: OYS
job_args:
extra_vars:
artifact_url: event.payload.date.artifact_url