https://github.com/smartgic/eda
Smart'Gic Event Driven Ansible collection
https://github.com/smartgic/eda
aap ansible awx collection eda event-driven-ansible galaxy websocket
Last synced: about 1 month ago
JSON representation
Smart'Gic Event Driven Ansible collection
- Host: GitHub
- URL: https://github.com/smartgic/eda
- Owner: smartgic
- License: apache-2.0
- Created: 2023-12-11T19:12:30.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-12T16:54:39.000Z (over 2 years ago)
- Last Synced: 2024-01-29T10:49:36.583Z (over 2 years ago)
- Topics: aap, ansible, awx, collection, eda, event-driven-ansible, galaxy, websocket
- Language: Python
- Homepage: https://galaxy.ansible.com/ui/repo/published/smartgic/eda/
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Event Driven Automation Collection
This collection was born with the idea to group some plugins and resources that can be helpful in extending the Event Driven Automation collection.
## Plugins
The following plugins are included in this collection:
| Name | Description |
| ------------------------ | -------------------------------- |
| `smartgic.eda.websocket` | Listen to a websocket for events |
### Usage
A sample rulebook using `smartgic.eda.websocket` source plugin is shown below:
```yaml
---
- name: Demo rules with websocket as source
hosts: all
sources:
- name: websocket
smartgic.eda.websocket:
host: "{{ websocket_host | default('127.0.0.1') }}"
port: "{{ websocket_port | default(8181) }}"
path: "{{ websocket_path | default('/core') }}"
rules:
- name: Run job template
condition: event.type == "ovos-skill-personal.OpenVoiceOS:WhoMadeYou.intent"
action:
run_job_template:
name: OVOS History
organization: Default
job_args:
extra_vars:
which_user: Gaetan
retries: 2
delay: 10
```
In order to pass the `extra_vars` make sure to check *"Prompt on Launch"* within the job template, *cf:* https://github.com/ansible/ansible-rulebook/issues/622
## Build DE (Decision Environment)
In order to get the collection build within the decision environment, please follow the steps below:
```shell
git clone https://github.com/smartgic/eda.git
cd eda
pip install ansible-builder
ansible-builder build -f decision-environment.yml -t smartgic/de-custom:latest -t smartgic/de-custom:1.0.2
podman push smartgic/de-custom:latest
```