Compare commits

...

2 Commits

Author SHA1 Message Date
c8485bc35b Add Alertmanager 2024-01-16 14:46:31 -05:00
51709f6ee9 Ignore vscode files 2024-01-01 19:29:01 -05:00
3 changed files with 24 additions and 2 deletions

4
.gitignore vendored
View File

@@ -268,4 +268,6 @@ context/
collections/ansible_collections/
.vault_password
secrets.yml
.swp
.swp
# Ignore vscode
.vscode/

View File

@@ -1,3 +1,3 @@
{
"ansible.python.interpreterPath": "/var/home/ptoal/.virtualenvs/ansible/bin/python"
"ansible.python.interpreterPath": "/home/ptoal/.virtualenvs/ansible/bin/python"
}

View File

@@ -0,0 +1,20 @@
---
- name: Listen for Alertmanager events
hosts: all
sources:
- name: Ansible Alertmanager listener
ansible.eda.alertmanager:
port: 9100
host: 0.0.0.0
rules:
- name: Run Template
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.data.artifact_url }}"