{"id":24849383,"url":"https://github.com/bugbiteme/aap-eda-demo","last_synced_at":"2026-01-05T19:42:53.459Z","repository":{"id":185392891,"uuid":"626572341","full_name":"bugbiteme/aap-eda-demo","owner":"bugbiteme","description":"Ansible Demonstration of Event Driven Automation","archived":false,"fork":false,"pushed_at":"2023-04-14T17:14:49.000Z","size":20,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T12:36:19.588Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bugbiteme.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-04-11T18:30:51.000Z","updated_at":"2023-11-23T11:02:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"1298d603-3253-42b6-a6f6-c21cbee5ec0a","html_url":"https://github.com/bugbiteme/aap-eda-demo","commit_stats":null,"previous_names":["bugbiteme/aap-eda-demo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugbiteme%2Faap-eda-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugbiteme%2Faap-eda-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugbiteme%2Faap-eda-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugbiteme%2Faap-eda-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bugbiteme","download_url":"https://codeload.github.com/bugbiteme/aap-eda-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245642761,"owners_count":20648914,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-31T12:31:08.471Z","updated_at":"2026-01-05T19:42:53.405Z","avatar_url":"https://github.com/bugbiteme.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# aap-eda-demo\nAnsible Demonstration of Event Driven Automation\n\nPrereqs:\n\n`dnf --assumeyes install java-17-openjdk python3-pip`  \n\n`export JAVA_HOME=/usr/lib/jvm/java-17-openjdk`  \n\n`pip install ansible-rulebook`  \n\n`ansible-galaxy collection install ansible.eda`  \n\n\n## Webhook example\non terminal 1  \n`ansible-rulebook --rulebook webhook-example.yml -i inventory.yml --print-events`  \n\non terminal 2  \n`curl -H 'Content-Type: application/json' -d \"{\\\"message\\\": \\\"Ansible is alright\\\"}\" 127.0.0.1:5000/endpoint`  \n\nlook at results on terminal 1  \n\non terminal 2  \n`curl -H 'Content-Type: application/json' -d \"{\\\"message\\\": \\\"Ansible is super cool\\\"}\" 127.0.0.1:5000/endpoint`  \n\nlook at results on terminal 1\n\n## Configuration Drift Example (webhook)\non terminal 1  \n`ansible-rulebook --rulebook webhook-example.yml -i inventory.yml --print-events`  \n\non terminal 2 (to test)\n`curl -H 'Content-Type: application/json' -d \"{\\\"event_type\\\": \\\"drift-baseline-detected\\\"}\" 127.0.0.1:5000/endpoint`  \n(or public URL from outside)  \n\noutput should be:  \n\n```\n{   'meta': {   'endpoint': 'endpoint',\n                'headers': {   'Accept': '*/*',\n                               'Content-Length': '41',\n                               'Content-Type': 'application/json',\n                               'Host': 'aap.leonlevy.net:5000',\n                               'User-Agent': 'curl/7.87.0'}},\n    'payload': {'event_type': 'drift-baseline-detected'}}\n\nPLAY [Remediation Playbook - Restore Baseline] *********************************\n\nTASK [debug] *******************************************************************\nok: [localhost] =\u003e {\n    \"msg\": \"Running Remediation Tasks for System!\"\n}\n```    \n\nTo test webhook with insights, set up basline config drift monitoring and set up webhook integrations\n\nUsing Red Hat Insights as a source of events for Event-Driven Ansible automation  \nhttps://www.ansible.com/blog/using-red-hat-insights-as-a-source-of-events-for-event-driven-ansible-automation  \n\nIntroducing Red Hat Insights Drift Capability for Red Hat Enterprise Linux configuration troubleshooting\nhttps://www.redhat.com/en/blog/introducing-red-hat-insights-drift-capability-red-hat-enterprise-linux-configuration-troubleshooting\n\n\nTrigger event on managed RHEL system by issuing the following command on it:\n\n\n`sudo insights-client`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugbiteme%2Faap-eda-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbugbiteme%2Faap-eda-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugbiteme%2Faap-eda-demo/lists"}