{"id":24353,"date":"2023-04-06T17:32:53","date_gmt":"2023-04-06T15:32:53","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=24353"},"modified":"2023-04-06T17:32:53","modified_gmt":"2023-04-06T15:32:53","slug":"ansible-driven-automation-and-kafka","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/ansible-driven-automation-and-kafka\/","title":{"rendered":"Ansible Driven Automation and Kafka"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I will add another example of what can be done with Ansible Driven Automation by interfacing it with Kafka. For those who wonder what Event-Driven Ansible is have a look at my previous <a href=\"https:\/\/www.dbi-services.com\/blog\/ansible-event-driven-automation\/\" target=\"_blank\" rel=\"noreferrer noopener\">blog<\/a> about it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Additional Installation Steps<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In my previous blog, I already listed the steps to setup Event Driven Ansible (EDA). To connect to Kafka (I will talk about Kafka installation in next chapter), Ansible has more requirements which are not installed via <code>ansible-galaxy<\/code>, but via <code>pip<\/code>. To do so, simply use the requirements file from the collection:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\npip install -r ~\/.ansible\/collections\/ansible_collections\/ansible\/eda\/requirements.txt\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">If you did not do it, you will face an error message <code>ModuleNotFoundError: No module named 'aiokafka'<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install Kafka<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">First, we need to download the package:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\ncurl -O https:\/\/packages.confluent.io\/archive\/7.3\/confluent-7.3.3.zip\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">unzip it with <code>unzip confluent-7.3.3.zip<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once we moved into the extracted directory, we must create a new storage. For that, we will use <code>kafka-storage<\/code> to generate a unique random id:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nKAFKA_CLUSTER_ID=&quot;$(bin\/kafka-storage random-uuid)&quot;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">And format storage with that ID:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nbin\/kafka-storage format -t $KAFKA_CLUSTER_ID -c etc\/kafka\/kraft\/server.properties\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">The mentioned properties file is an example provided with the package. I changed two options in that file:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>advertised.listeners to the server IP instead of localhost<\/li>\n\n\n\n<li>log.dirs to a more persitent directory as it was pointing to \/tmp<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Now that storage is ready, we can start Kafka server:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nbin\/kafka-server-start etc\/kafka\/kraft\/server.properties\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Server will take few seconds to start and will be eventually ready:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;2023-04-06 14:14:09,584] INFO &#x5B;KafkaRaftServer nodeId=1] Kafka Server started (kafka.server.KafkaRaftServer)\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Keep this window open as it is running server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Rule Book<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The rule book will look like this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\n---\n- name: Demo rules with kafka as source\n  hosts: localhost\n  sources:\n    - name: Kafka\n      ansible.eda.kafka:\n        topic: eda\n        host: 192.168.33.20\n        port: 9092\n        group_id: testing\n  rules:\n    - name: Check defined\n      condition: event.i is defined\n      action:\n        debug:\n    - name: Stop\n      condition: event.stop == true\n      action:\n        shutdown:\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">And starting it with <code>ansible-rulebook --rulebook kafka-test-rules.yml -i inventory.yml --verbose<\/code>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n2023-04-06 14:46:17,311 - ansible_rulebook.app - INFO - Starting sources\n2023-04-06 14:46:17,312 - ansible_rulebook.app - INFO - Starting rules\n2023-04-06 14:46:17,312 - ansible_rulebook.engine - INFO - run_ruleset\n2023-04-06 14:46:18,070 - ansible_rulebook.engine - INFO - ruleset define: {&quot;name&quot;: &quot;Demo rules with kafka as source&quot;, &quot;hosts&quot;: &#x5B;&quot;localhost&quot;], &quot;sources&quot;: &#x5B;{&quot;EventSource&quot;: {&quot;name&quot;: &quot;Kafka&quot;, &quot;source_name&quot;: &quot;ansible.eda.kafka&quot;, &quot;source_args&quot;: {&quot;topic&quot;: &quot;eda&quot;, &quot;host&quot;: &quot;192.168.33.20&quot;, &quot;port&quot;: 9092, &quot;group_id&quot;: &quot;testing&quot;}, &quot;source_filters&quot;: &#x5B;]}}], &quot;rules&quot;: &#x5B;{&quot;Rule&quot;: {&quot;name&quot;: &quot;Check defined&quot;, &quot;condition&quot;: {&quot;AllCondition&quot;: &#x5B;{&quot;IsDefinedExpression&quot;: {&quot;Event&quot;: &quot;i&quot;}}]}, &quot;action&quot;: {&quot;Action&quot;: {&quot;action&quot;: &quot;debug&quot;, &quot;action_args&quot;: {}}}, &quot;enabled&quot;: true}}, {&quot;Rule&quot;: {&quot;name&quot;: &quot;Stop&quot;, &quot;condition&quot;: {&quot;AllCondition&quot;: &#x5B;{&quot;EqualsExpression&quot;: {&quot;lhs&quot;: {&quot;Event&quot;: &quot;stop&quot;}, &quot;rhs&quot;: {&quot;Boolean&quot;: true}}}]}, &quot;action&quot;: {&quot;Action&quot;: {&quot;action&quot;: &quot;shutdown&quot;, &quot;action_args&quot;: {}}}, &quot;enabled&quot;: true}}]}\n2023-04-06 14:46:18,070 - ansible_rulebook.engine - INFO - load source\n2023-04-06 14:46:18,646 - ansible_rulebook.engine - INFO - load source filters\n2023-04-06 14:46:18,650 - ansible_rulebook.engine - INFO - Calling main in ansible.eda.kafka\n2023-04-06 14:46:18,650 - aiokafka.consumer.subscription_state - INFO - Updating subscribed topics to: frozenset({&#039;eda&#039;})\n2023-04-06 14:46:18,654 - ansible_rulebook.engine - INFO - Start a playbook action runner for Demo rules with kafka as source\n2023-04-06 14:46:18,655 - ansible_rulebook.engine - INFO - Waiting for actions on events from Demo rules with kafka as source\n2023-04-06 14:46:18,655 - ansible_rulebook.engine - INFO - Waiting for events from Demo rules with kafka as source\n2023-04-06 14:46:18,709 - aiokafka.consumer.group_coordinator - INFO - Discovered coordinator 1 for group testing\n2023-04-06 14:46:18,711 - aiokafka.consumer.group_coordinator - INFO - Revoking previously assigned partitions set() for group testing\n2023-04-06 14:46:18,711 - aiokafka.consumer.group_coordinator - INFO - (Re-)joining group testing\n2023-04-06 14:46:18,762 - aiokafka.consumer.group_coordinator - INFO - Joined group &#039;testing&#039; (generation 5) with member_id aiokafka-0.8.0-4497ff79-c442-4cf2-97a2-958708bbdfde\n2023-04-06 14:46:18,762 - aiokafka.consumer.group_coordinator - INFO - Elected group leader -- performing partition assignments using roundrobin\n2023-04-06 14:46:18,794 - aiokafka.consumer.group_coordinator - INFO - Successfully synced group testing with generation 5\n2023-04-06 14:46:18,795 - aiokafka.consumer.group_coordinator - INFO - Setting newly assigned partitions {TopicPartition(topic=&#039;eda&#039;, partition=0)} for group testing\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s produce few messages to test everything works as expected (finishing with Ctrl+c):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n~\/confluent-7.3.3$ .\/bin\/kafka-console-producer --bootstrap-server 192.168.33.20:9092 --topic eda\n&gt;TEST1\n&gt;TEST2\n&gt;^Cvagrant@debian11:~\/confluent-7.3.3$\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">And consume them:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n~\/confluent-7.3.3$ .\/bin\/kafka-console-consumer --bootstrap-server 192.168.33.20:9092 --topic eda --from-beginning\nTEST1\nTEST2\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">&#8220;<code>--from-beginning<\/code>&#8221; flag will make consumer read whole topic history.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Triggering the Playbook<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As in previous blog, messages are in JSON format. The rule book has two rules:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If JSON has a &#8220;i&#8221; field, it will display debug information.<\/li>\n\n\n\n<li>If it has a &#8220;stop&#8221; field set to true, it will stop the rule book.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s git it a try:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the producer prompt (i.e. <code>&gt;<\/code>), I enter {&#8220;i&#8221;:&#8221;&#8221;}, the following will be displayed in the ansible-rulebook:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n2023-04-06 15:15:06 855 &#x5B;main] INFO org.drools.ansible.rulebook.integration.api.rulesengine.RegisterOnlyAgendaFilter - Activation of effective rule &quot;Check defined&quot; with facts: &#x5B;Event DROOLS_PROTOTYPE with values = {i=}]\n2023-04-06 15:15:06,856 - ansible_rulebook.rule_generator - INFO - calling Check defined\n2023-04-06 15:15:06,857 - ansible_rulebook.engine - INFO - call_action debug\n2023-04-06 15:15:06,857 - ansible_rulebook.engine - INFO - substitute_variables &#x5B;{}] &#x5B;{&#039;event&#039;: {&#039;i&#039;: &#039;&#039;}, &#039;fact&#039;: {&#039;i&#039;: &#039;&#039;}}]\n2023-04-06 15:15:06,857 - ansible_rulebook.engine - INFO - action args: {}\n======================================================================================================================================================================================================\nkwargs:\n{&#039;facts&#039;: {},\n &#039;hosts&#039;: &#x5B;&#039;localhost&#039;],\n &#039;inventory&#039;: {&#039;all&#039;: {&#039;hosts&#039;: {&#039;localhost&#039;: {&#039;ansible_connection&#039;: &#039;local&#039;}}}},\n &#039;project_data_file&#039;: None,\n &#039;ruleset&#039;: &#039;Demo rules with kafka as source&#039;,\n &#039;source_rule_name&#039;: &#039;Check defined&#039;,\n &#039;source_ruleset_name&#039;: &#039;Demo rules with kafka as source&#039;,\n &#039;variables&#039;: {&#039;event&#039;: {&#039;i&#039;: &#039;&#039;}, &#039;fact&#039;: {&#039;i&#039;: &#039;&#039;}}}\n======================================================================================================================================================================================================\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Next message could be <code>{\"stop\":true}<\/code> and associated output of ansible-rulebook:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n2023-04-06 15:17:43 398 &#x5B;main] INFO org.drools.ansible.rulebook.integration.api.rulesengine.RegisterOnlyAgendaFilter - &amp;lt;strong&amp;gt;Activation of effective rule &quot;Stop&quot;&amp;lt;\/strong&amp;gt; with facts: &#x5B;Event DROOLS_PROTOTYPE with values = {stop=true}]\n2023-04-06 15:17:43,419 - ansible_rulebook.rule_generator - INFO - calling Stop\n2023-04-06 15:17:43,421 - ansible_rulebook.engine - INFO - call_action shutdown\n2023-04-06 15:17:43,422 - ansible_rulebook.engine - INFO - substitute_variables &#x5B;{}] &#x5B;{&#039;event&#039;: {&#039;stop&#039;: True}, &#039;fact&#039;: {&#039;stop&#039;: True}}]\n2023-04-06 15:17:43,422 - ansible_rulebook.engine - INFO - action args: {}\n2023-04-06 15:17:43,437 - ansible_rulebook.engine - INFO - Attempt to stop ruleset Demo rules with kafka as source\n2023-04-06 15:17:43,438 - ansible_rulebook.engine - INFO - Playbook action runner Demo rules with kafka as source exits\n2023-04-06 15:17:43,439 - ansible_rulebook.engine - INFO - Stopped waiting for actions on events from Demo rules with kafka as source\n2023-04-06 15:17:43,441 - ansible_rulebook.engine - INFO - Stopped waiting on events from Demo rules with kafka as source\n2023-04-06 15:17:43,442 - ansible_rulebook.engine - INFO - Canceling all ruleset tasks\n2023-04-06 15:17:43,444 - ansible_rulebook.app - INFO - Cancelling event source tasks\n2023-04-06 15:17:43,447 - root - INFO - Stopping kafka consumer\n2023-04-06 15:17:43,464 - aiokafka.consumer.group_coordinator - INFO - LeaveGroup request succeeded\n2023-04-06 15:17:43,467 - ansible_rulebook.engine - INFO - Task cancelled\n2023-04-06 15:17:43,468 - ansible_rulebook.app - INFO - Main complete\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Certainly, it is not possible to reverse this action remotely as the service is stopped \ud83d\ude09 .<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you have any idea or suggestion on possible scenario I could test, feel free to leave a comment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I will add another example of what can be done with Ansible Driven Automation by interfacing it with Kafka. For those who wonder what Event-Driven Ansible is have a look at my previous blog about it. Additional Installation Steps In my previous blog, I already listed the steps to setup Event Driven Ansible (EDA). To&hellip;&nbsp;<\/p>\n","protected":false},"author":40,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[4134,1320],"tags":[708,1103],"class_list":["post-24353","post","type-post","status-publish","format-standard","hentry","category-application-server","category-devops","tag-automation","tag-kafka"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.4 (Yoast SEO v28.7) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Ansible Driven Automation and Kafka - dbi services | Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/ansible-driven-automation-and-kafka\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ansible Driven Automation and Kafka\" \/>\n<meta property=\"og:description\" content=\"I will add another example of what can be done with Ansible Driven Automation by interfacing it with Kafka. For those who wonder what Event-Driven Ansible is have a look at my previous blog about it. Additional Installation Steps In my previous blog, I already listed the steps to setup Event Driven Ansible (EDA). To&hellip;&nbsp;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/ansible-driven-automation-and-kafka\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi services | Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dbiservices\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-06T15:32:53+00:00\" \/>\n<meta name=\"author\" content=\"Middleware Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:site\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Middleware Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/ansible-driven-automation-and-kafka\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/ansible-driven-automation-and-kafka\\\/\"},\"author\":{\"name\":\"Middleware Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8a0bfec3c3bd1f27d3d452eaa592bfb8\"},\"headline\":\"Ansible Driven Automation and Kafka\",\"datePublished\":\"2023-04-06T15:32:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/ansible-driven-automation-and-kafka\\\/\"},\"wordCount\":369,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#organization\"},\"keywords\":[\"Automation\",\"kafka\"],\"articleSection\":[\"Application Server\",\"DevOps\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/ansible-driven-automation-and-kafka\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/ansible-driven-automation-and-kafka\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/ansible-driven-automation-and-kafka\\\/\",\"name\":\"Ansible Driven Automation and Kafka - dbi services | Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"datePublished\":\"2023-04-06T15:32:53+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/ansible-driven-automation-and-kafka\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/ansible-driven-automation-and-kafka\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/ansible-driven-automation-and-kafka\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ansible Driven Automation and Kafka\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi services Blog\",\"description\":\"#BeSharing\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#organization\"},\"alternateName\":\"dbi Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#organization\",\"name\":\"dbi services\",\"alternateName\":\"dbi\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"width\":512,\"height\":512,\"caption\":\"dbi services\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/dbiservices\\\/\",\"https:\\\/\\\/x.com\\\/dbiservices\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/dbi-services\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/dbiservices\"],\"description\":\"Swiss IT consulting and services company specialised in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.\",\"email\":\"info@dbi-services.com\",\"telephone\":\"+41 32 422 96 00\",\"legalName\":\"dbi services SA\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8a0bfec3c3bd1f27d3d452eaa592bfb8\",\"name\":\"Middleware Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"caption\":\"Middleware Team\"},\"description\":\"Posts published under the Middleware Team account are collective contributions by the dbi services middleware and enterprise content management consultants. The practice covers ECM platforms such as OpenText Documentum, Alfresco, and M-Files, as well as application servers and integration technologies including WebLogic, JBoss, Tomcat, and the Elastic Stack, from architecture and deployment to operations under service level agreements.\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/middleware-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Ansible Driven Automation and Kafka - dbi services | Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/ansible-driven-automation-and-kafka\/","og_locale":"en_US","og_type":"article","og_title":"Ansible Driven Automation and Kafka","og_description":"I will add another example of what can be done with Ansible Driven Automation by interfacing it with Kafka. For those who wonder what Event-Driven Ansible is have a look at my previous blog about it. Additional Installation Steps In my previous blog, I already listed the steps to setup Event Driven Ansible (EDA). To&hellip;&nbsp;","og_url":"https:\/\/www.dbi-services.com\/blog\/ansible-driven-automation-and-kafka\/","og_site_name":"dbi services | Blog","article_publisher":"https:\/\/www.facebook.com\/dbiservices\/","article_published_time":"2023-04-06T15:32:53+00:00","author":"Middleware Team","twitter_card":"summary_large_image","twitter_creator":"@dbiservices","twitter_site":"@dbiservices","twitter_misc":{"Written by":"Middleware Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/ansible-driven-automation-and-kafka\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/ansible-driven-automation-and-kafka\/"},"author":{"name":"Middleware Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8a0bfec3c3bd1f27d3d452eaa592bfb8"},"headline":"Ansible Driven Automation and Kafka","datePublished":"2023-04-06T15:32:53+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/ansible-driven-automation-and-kafka\/"},"wordCount":369,"commentCount":4,"publisher":{"@id":"https:\/\/www.dbi-services.com\/blog\/#organization"},"keywords":["Automation","kafka"],"articleSection":["Application Server","DevOps"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/ansible-driven-automation-and-kafka\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/ansible-driven-automation-and-kafka\/","url":"https:\/\/www.dbi-services.com\/blog\/ansible-driven-automation-and-kafka\/","name":"Ansible Driven Automation and Kafka - dbi services | Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2023-04-06T15:32:53+00:00","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/ansible-driven-automation-and-kafka\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/ansible-driven-automation-and-kafka\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/ansible-driven-automation-and-kafka\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Ansible Driven Automation and Kafka"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi services Blog","description":"#BeSharing","publisher":{"@id":"https:\/\/www.dbi-services.com\/blog\/#organization"},"alternateName":"dbi Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dbi-services.com\/blog\/#organization","name":"dbi services","alternateName":"dbi","url":"https:\/\/www.dbi-services.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","width":512,"height":512,"caption":"dbi services"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dbiservices\/","https:\/\/x.com\/dbiservices","https:\/\/www.linkedin.com\/company\/dbi-services\/","https:\/\/www.youtube.com\/user\/dbiservices"],"description":"Swiss IT consulting and services company specialised in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.","email":"info@dbi-services.com","telephone":"+41 32 422 96 00","legalName":"dbi services SA"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8a0bfec3c3bd1f27d3d452eaa592bfb8","name":"Middleware Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","caption":"Middleware Team"},"description":"Posts published under the Middleware Team account are collective contributions by the dbi services middleware and enterprise content management consultants. The practice covers ECM platforms such as OpenText Documentum, Alfresco, and M-Files, as well as application servers and integration technologies including WebLogic, JBoss, Tomcat, and the Elastic Stack, from architecture and deployment to operations under service level agreements.","url":"https:\/\/www.dbi-services.com\/blog\/author\/middleware-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/24353","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=24353"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/24353\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=24353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=24353"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=24353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}