Skip to content

Instantly share code, notes, and snippets.

$schema: http://json-schema.org/draft-04/schema
additionalProperties: false
properties:
AMQ_MESH_DISCOVERY_TYPE:
default: kube
description: The discovery agent type to use for discovering mesh endpoints. 'dns'
will use OpenShift's DNS service to resolve endpoints. 'kube' will use
Kubernetes REST API to resolve service endpoints. If using 'kube' the
service account for the pod must have the 'view' role, which can be added
via 'oc policy add-role-to-user view system:serviceaccount:<namespace>:default'
@mkanoor
mkanoor / regex_test.yaml
Created March 11, 2020 17:48
OpenAPI Generation Issue with forward slash
openapi: 3.0.1
info:
title: Test Regex generation for parameter validation
version: 1.0.0
components:
responses:
OK_200:
description: OK

OpenapiClient::WorkflowSequenceIncrement

Properties

Name Type Description Notes
increment OneOfstringinteger A negative integer moves closer to top, positive integer closer to bottom, or literally top or bottom [optional]

Code Sample

---
- hosts: all
name: Multiple actions with sequetial execution
rules:
- actions:
- action:
echo:
message: Hurray it works
- action:
debug:
@mkanoor
mkanoor / vars_example.yml
Created January 24, 2023 14:32
Using vars in a rulebook similar to playbook
---
- name: Vars in rulebook
hosts: all
vars:
person:
age: 45
name: Fred Flintstone
active: true
reliability: 86.9
address:
---
- name: multiple conditions with assignments
hosts: all
sources:
- range:
limit: 5
rules:
- name: r1
condition:
all:
---
- name: Using locals instead of events
hosts: all
sources:
- range:
limit: 5
rules:
- name: r1
condition:
all:
@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,
@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
{
"$schema": "http://json-schema.org/draft-06/schema#",
"type": "array",
"items": {
"$ref": "#/definitions/Welcome1Element"
},
"definitions": {
"Welcome1Element": {
"type": "object",
"additionalProperties": false,