Skip to content

Instantly share code, notes, and snippets.

# yaml-language-server: $schema=https://raw.githubusercontent.com/mkanoor/ansible-rulebook/condition_ast/ansible_rulebook/schema/ruleset_schema.json
- hosts: localhost
name: demo
sources:
- ansible.eda.generic:
payload:
- zebra: false
- i: 3
- msg: Hello World
- f: 3.14159
---
- name: Test run job templates
hosts: all
sources:
- ansible.eda.webhook:
port: 4444
host: 0.0.0.0
filters:
- ansible.eda.insert_hosts_to_meta:
host_path: "payload.meta.host"
---
- name: Test run job templates
hosts: all
sources:
- ansible.eda.webhook:
port: 4444
host: 0.0.0.0
rules:
- name: "Run job template"
condition: event.payload.i == 0
- hosts: localhost
user: root
connection: local
gather_facts: no
vars:
key_file: /tmp/testing.key
key_pass_phrase: passphrase
tasks:
- name: add identity
---
- name: kafka listener
hosts: all
sources:
- name: Checked Kafka
checked: true
ansible.eda.kafka:
host: "{{ MY_KAFKA_HOST | default('localhost') }}"
topic: "{{ MY_KAFKA_TOPIC | default('demo') }}"
port: 9092
fields:
- id: host
type: string
label: Kafka Host
help_text: Address of Kafka Host
- id: port
type: string
label: Kafka Port
help_text: Kafka Port
- id: topic
env:
KRB5_CONFIG: '{{ eda.filename.kerberos_config_file }}'
KRB5_KTNAME: '{{ eda.filename.keytab_file }}'
KRB5_CLIENT_KTNAME: '{{ eda.filename.keytab_file }}'
file:
template.keytab_file: '{{ keytab }}'
template.kerberos_config_file: '{{ kerberos_config }}'
extra_vars:
host: '{{ host }}'
port: '{{ port }}'
---
- name: Test event splitter filter
hosts: localhost
sources:
- ansible.eda.generic:
payload:
- incident:
id: 671561b1831671506180bea5
active: false
alerts:
env:
KRB5_CONFIG: '{{ eda.filename.kerberos_config_file }}'
KRB5_KTNAME: '{{ eda.filename.keytab_file }}'
KRB5_CLIENT_KTNAME: '{{ eda.filename.keytab_file }}'
file:
template.keytab_file: '{{ keytab }}'
template.kerberos_config_file: '{{ kerberos_config }}'
extra_vars:
host: '{{ host }}'
port: '{{ port }}'
@mkanoor
mkanoor / docker_compose_eda_envoy.yml
Created February 12, 2025 19:49
docker compose envoy with eda
x-environment:
&common-env
- EDA_DB_HOST=postgres
- EDA_MQ_HOST=${EDA_MQ_HOST:-redis}
- EDA_MQ_PORT=${EDA_MQ_PORT:-6379}
- EDA_MQ_REDIS_HA_CLUSTER_HOSTS=${EDA_MQ_REDIS_HA_CLUSTER_HOSTS:-}
- DJANGO_SETTINGS_MODULE=aap_eda.settings.default
- EDA_DB_PASSWORD=secret
- EDA_SECRET_KEY=secret
- EDA_ALLOWED_HOSTS=['*']