Skip to content

Instantly share code, notes, and snippets.

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 }}'
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
---
- 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
- hosts: localhost
user: root
connection: local
gather_facts: no
vars:
key_file: /tmp/testing.key
key_pass_phrase: passphrase
tasks:
- name: add identity
---
- 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
---
- 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"
# 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
{
"$schema": "http://json-schema.org/draft-06/schema#",
"type": "array",
"items": {
"$ref": "#/definitions/Welcome1Element"
},
"definitions": {
"Welcome1Element": {
"type": "object",
"additionalProperties": false,
@mkanoor
mkanoor / sample.yml
Last active September 18, 2023 21:05
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/mkanoor/ansible-rulebook/schema_changes/ansible_rulebook/schema/ruleset_schema.json
- name: Test run workflow templates
hosts: all
sources:
- ansible.eda.range:
limit: 5
rules:
- name: "Run workflow template"
condition: event.i == 1
@mkanoor
mkanoor / range.py
Last active September 9, 2023 00:23
# Copyright 2022 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,