{"id":3081,"date":"2023-11-17T11:14:32","date_gmt":"2023-11-17T10:14:32","guid":{"rendered":"https:\/\/www.cloudwerkstatt.com\/?p=3081"},"modified":"2023-11-28T09:22:25","modified_gmt":"2023-11-28T08:22:25","slug":"automate-reporting-with-ansible","status":"publish","type":"post","link":"https:\/\/www.cloudwerkstatt.com\/en\/automate-reporting-with-ansible\/","title":{"rendered":"Automate Reporting with Ansible"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/www.cloudwerkstatt.com\/wp-content\/uploads\/2023\/11\/automate_reporting_with_ansible.jpeg\" alt=\"automate_reporting_with_ansible\" \/><\/p>\n<p>\n\n<\/p>\n<p>\n\n<\/p>\n<p>\n\n<\/p>\n<h1>Automate Reporting with Ansible<\/h1>\n<p>Ansible is a powerful tool known for its capabilities in configuration management and application deployment.<br \/>\nHowever, it can be extended to handle another essential task: automated reporting. Leveraging Ansible&#8217;s modules and automation capabilities, you can simplify the process of generating reports.<br \/>\nIn this post, I will guide you on how to create a simple report and have it delivered directly via mail.<\/p>\n<p>\n\n<\/p>\n<p>\n\n<\/p>\n<p>\n\n<\/p>\n<h2>Understand the Need for Reporting<\/h2>\n<p>In this section, we&#8217;ll explore the logic behind automated reporting with Ansible. Ansible is a versatile tool that allows us to manage virtually everything in our environment, making it an ideal candidate for streamlining reporting tasks. When you already use tools like <a href=\"https:\/\/www.redhat.com\/en\/technologies\/management\/ansible\">AAP (Red Hat Ansible Automation Platform)<\/a> or <a href=\"https:\/\/github.com\/ansible\/awx\">AWX<\/a>, you likely schedule playbooks within them. It&#8217;s equally efficient to schedule reporting in the same tool, eliminating the need for additional reporting-specific solutions.<\/p>\n<p>While <a href=\"https:\/\/grafana.com\/docs\/grafana\/latest\/dashboards\/create-reports\/\">Grafana does offer a reporting feature<\/a>, it&#8217;s restricted to the enterprise version, which may not be accessible to everyone. However, with Ansible, you have the freedom to design reports that align perfectly with your specific needs<\/p>\n<p>\n\n<\/p>\n<p>\n\n<\/p>\n<p>\n\n<\/p>\n<h2>Creating a Practical Example<\/h2>\n<p>To illustrate the power of Ansible in reporting, let&#8217;s walk through an example that can be adapted to various use cases. We&#8217;ll use Prometheus as the data source, but you can use databases, API endpoints, or any data source relevant to your needs.<\/p>\n<p>In this example, we&#8217;ll fulfill a manager&#8217;s request for a monthly report on the <strong>number of Kubernetes worker nodes per cluster<\/strong> and the <strong>total number of worker nodes across all clusters<\/strong>.<\/p>\n<p>The manager expects a report with the following structure:<\/p>\n<table>\n<thead>\n<tr>\n<th>Cluster Name<\/th>\n<th>Number of Worker Nodes<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>europe-north1-a-k8s-1<\/td>\n<td>6<\/td>\n<\/tr>\n<tr>\n<td>europe-north1-a-k8s-2<\/td>\n<td>6<\/td>\n<\/tr>\n<tr>\n<td>europe-central2-a-k8s-1<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td>europe-central2-a-k8s-2<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td>europe-west1-c-k8s-1<\/td>\n<td>4<\/td>\n<\/tr>\n<tr>\n<td>europe-west1-c-k8s-2<\/td>\n<td>4<\/td>\n<\/tr>\n<tr>\n<td>us-west1-a-k8s-1<\/td>\n<td>5<\/td>\n<\/tr>\n<tr>\n<td>us-west1-a-k8s-2<\/td>\n<td>5<\/td>\n<\/tr>\n<tr>\n<td>us-central1-a-k8s-1<\/td>\n<td>4<\/td>\n<\/tr>\n<tr>\n<td>us-central1-a-k8s-2<\/td>\n<td>4<\/td>\n<\/tr>\n<tr>\n<td>asia-east1-a-k8s-1<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td>asia-east1-a-k8s-2<\/td>\n<td>3<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre><code class=\"language-bash\">Total worker nodes: 50<\/code><\/pre>\n<p>\n\n<\/p>\n<p>\n\n<\/p>\n<p>\n\n<\/p>\n<h2>Collecting Data for Reporting<\/h2>\n<p>To gather the data required for reporting, we can take advantage of Prometheus, which is deployed to monitor each Kubernetes cluster.<br \/>\nIn this setup, metrics from individual Kubernetes clusters are <a href=\"https:\/\/www.cloudwerkstatt.com\/en\/prometheus-federation-exploring-all-job-metrics-vs-specific-metrics\/\">federated<\/a> into a central Prometheus instance. This central Prometheus instance serves as a unified endpoint for central view, allowing us to easily query and collect data for our reporting needs.<\/p>\n<p>The process of collecting this data and using it in Ansible is straightforward. We can run queries using the <a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/collections\/ansible\/builtin\/uri_module.html\">ansible.builtin.uri<\/a> module in Ansible to access the central Prometheus instance&#8217;s API. The results of these queries, which are in JSON format, are registered and can be utilized in Ansible Jinja2 templating for report generation.<\/p>\n<p>If you are already familiar with the Prometheus Query Language (<code>PromQL<\/code>), you can write custom queries to extract the exact information you need. For instance, you can use a query like this to obtain the number of worker nodes per cluster. The query is stored in the Ansible inventory as a variable.<\/p>\n<pre><code class=\"language-yaml\">reporter_prometheus_worker_nodes_per_cluster: &#039;sum by (cluster_name) (kube_node_role{role=&quot;worker&quot;})&#039;<\/code><\/pre>\n<p>Additionally, you can calculate the total number of worker nodes across all clusters with a query like this:<\/p>\n<pre><code class=\"language-yaml\">reporter_prometheus_worker_nodes_total: &#039;sum(kube_node_role{role=&quot;worker&quot;})&#039;<\/code><\/pre>\n<p>\n\n<\/p>\n<p>\n\n<\/p>\n<p>\n\n<\/p>\n<h2>Ansible Reporting Automation<\/h2>\n<p>Let&#8217;s dive into the automation process. To keep this blog concise and focused, I&#8217;ll provide an overview of the key components. In practice, you can expand and customize this process according to your specific reporting needs.<\/p>\n<p>First, we&#8217;ll create an Ansible role, which I&#8217;ve named <code>reporter_prometheus<\/code>. This role serves as a modular solution that can be easily extended with multiple templates for different queries and reports. Using <a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/playbook_guide\/playbooks_tags.html\">tags<\/a>, you can even call specific reports when needed.<\/p>\n<p>Here&#8217;s an overview of how this reporting automation works:<\/p>\n<ol>\n<li>Create the <code>reporter_prometheus<\/code> Ansible role, which retrieves data from Prometheus and sends the report to the manager.<\/li>\n<li>Schedule the playbook execution in either AAP (Red Hat Ansible Automation Platform) or AWX. If you&#8217;re not using AAP or AWX, you can schedule the playbook to run directly on the controller node using a cron job, depending on your preference.<\/li>\n<li>Extend the scheduling workflow in AAP or AWX with conditions to handle scenarios where the report fails to run. This allows you to incorporate additional logic and notifications.<\/li>\n<\/ol>\n<p>Within the <code>reporter_prometheus<\/code> role, we have two key components:<\/p>\n<ol>\n<li>Task Play: This part of the role is responsible for extracting data from Prometheus and generating the report.<\/li>\n<li>Template: Jinja2 templates are used to format the collected data into the desired report structure. These templates can be customized to meet your specific reporting requirements.<\/li>\n<\/ol>\n<p>\n\n<\/p>\n<p>\n\n<\/p>\n<p>\n\n<\/p>\n<h3>Ansible Task Play<\/h3>\n<ul>\n<li>This task retrieves data from Prometheus for the total number of worker nodes across all clusters and registers the result in the <code>__worker_nodes_total<\/code> variable, which is then used in the Jinja2 template for the worker report.<\/li>\n<\/ul>\n<pre><code class=\"language-yaml\">- name: Query Prometheus - Total workers nodes\n  ansible.builtin.uri:\n    url: &quot;https:\/\/central-prometheus.cloudwerkstatt.com:9090\/api\/v1\/query?query={{ reporter_prometheus_worker_nodes_total | urlencode }}&quot;\n    method: GET\n    headers:\n      Content-Type: &quot;application\/json&quot;\n    validate_certs: &quot;true&quot;\n  register: __worker_nodes_total\n  retries: 15\n  delay: 20\n  until: __worker_nodes_total.status == 200\n  delegate_to: localhost<\/code><\/pre>\n<ul>\n<li>This task gathers data from Prometheus to determine the total number of worker nodes per cluster. The result is registered and used in a <code>for<\/code> loop in the template to generate the content of the table.<\/li>\n<\/ul>\n<pre><code class=\"language-yaml\">- name: Query Prometheus - Worker nodes per cluster\n  ansible.builtin.uri:\n    url: &quot;https:\/\/central-prometheus.cloudwerkstatt.com:9090\/api\/v1\/query?query={{ reporter_prometheus_worker_nodes_per_cluster | urlencode }}&quot;\n    method: GET\n    headers:\n      Content-Type: &quot;application\/json&quot;\n    validate_certs: &quot;true&quot;\n  register: __worker_nodes_per_cluster\n  retries: 15\n  delay: 20\n  until: __worker_nodes_per_cluster.status == 200\n  delegate_to: localhost<\/code><\/pre>\n<p>As you can see, I&#8217;ve removed all variables from the play above to keep it simple and easy to read. The only remaining variable contains the <code>PromQL<\/code> query, which utilizes the <code>urlencode<\/code> filter.<br \/>\nThese tasks serve as the core of the reporting automation, collecting the necessary data and registering the results. Registered variables will be used in the template, as shown in the next section.<\/p>\n<ul>\n<li>This task sends an email with an HTML report, created using a <code>Jinja2<\/code> template.<\/li>\n<\/ul>\n<pre><code class=\"language-yaml\">- name: Send E-mail HTML Report\n  community.general.mail:\n    host: &quot;smtp-server.cloudwerkstatt.com&quot;\n    port: &quot;587&quot;\n    username: &quot;top-secret-username&quot;\n    password: &quot;SECRET&quot;\n    subject: &quot;Worker Nodes Report&quot;\n    body: &quot;{{ lookup(&#039;template&#039;, &#039;templates\/worker_report.html.j2&#039;) }}&quot;\n    to: &quot;your.manager@cloudwerkstatt.com&quot;\n    sender: &quot;no-reply@cloudwerkstatt.com&quot;\n    secure: &quot;always&quot;\n    charset: &quot;utf-8&quot;\n    subtype: html\n  delegate_to: localhost<\/code><\/pre>\n<p>\n\n<\/p>\n<p>\n\n<\/p>\n<p>\n\n<\/p>\n<h3>Ansible Jinja2 Template for Report<\/h3>\n<p>Here&#8217;s the responsive HTML report template (<code>worker_report.html.j2<\/code>) that contains the information requested by the manager.<\/p>\n<pre><code class=\"language-html\">&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n    &lt;style&gt;\n        body {\n            font-family: Arial, sans-serif;\n            background-color: #f0f0f0;\n            margin: 0;\n            padding: 0;\n        }\n\n        .container {\n            width: 90%;\n            max-width: 600px;\n            margin: 0 auto;\n            padding: 20px;\n        }\n\n        h2 {\n            text-align: center;\n            color: #333;\n        }\n\n        h3 {\n            text-align: left;\n            color: #666;\n        }\n\n        table {\n            width: 100%;\n            border-collapse: collapse;\n            margin: 20px 0;\n        }\n\n        table, th, td {\n            border: 1px solid #333;\n        }\n\n        th, td {\n            padding: 10px;\n            text-align: left;\n        }\n\n        th {\n            background-color: #333;\n            color: #fff;\n        }\n\n        footer {\n            text-align: center;\n            margin-top: 20px;\n        }\n\n        p {\n            color: #999;\n        }\n\n        img {\n            display: block;\n            margin: 0 auto;\n        }\n    &lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n    &lt;div class=&quot;container&quot;&gt;\n        &lt;img src=&quot;https:\/\/CompanyLogoImageUrl&quot; alt=&quot;Company Logo&quot; width=&quot;180&quot; height=&quot;30&quot; \/&gt;\n        &lt;h2&gt;Worker Nodes Report&lt;\/h2&gt;\n        &lt;h3&gt;Report Execution Date: {{ ansible_date_time.iso8601 }} {{ ansible_date_time.tz }}&lt;\/h3&gt;\n        &lt;h3&gt;Report Month: {{ ansible_date_time.month }}&lt;\/h3&gt;\n        &lt;h3&gt;Total Worker Nodes: {{ __worker_nodes_total.json | json_query(&#039;data.result[0].value[1]&#039;) }}&lt;\/h3&gt;\n\n        &lt;table&gt;\n            &lt;tr&gt;\n                &lt;th&gt;Cluster Name&lt;\/th&gt;\n                &lt;th&gt;Number of Workers Nodes&lt;\/th&gt;\n            &lt;\/tr&gt;\n{% for each in __worker_nodes_per_cluster.json | json_query(&#039;data.result&#039;) %}\n            &lt;tr&gt;\n                &lt;td&gt;{{ each.metric.cluster_name }}&lt;\/td&gt;\n                &lt;td&gt;{{ each.value[1] }}&lt;\/td&gt;\n            &lt;\/tr&gt;\n{% endfor %}\n        &lt;\/table&gt;\n\n        &lt;footer&gt;\n            &lt;p&gt;\u00a9 {{ ansible_date_time.year }} cloudWerkstatt. All rights reserved.&lt;\/p&gt;\n        &lt;\/footer&gt;\n    &lt;\/div&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n<p>Data is dynamically populated into the table using a <code>for<\/code> loop from a variable registered during the play.<br \/>\nThe JSON data is extracted using the <code>json_query<\/code> filter, and the date is sourced from Ansible facts.<\/p>\n<p>\n\n<\/p>\n<p>\n\n<\/p>\n<p>\n\n<\/p>\n<h2>Generating Report<\/h2>\n<p>Here&#8217;s the report as it appears in the mailbox:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.cloudwerkstatt.com\/wp-content\/uploads\/2023\/11\/worker_nodes_report_result.png\" alt=\"worker_nodes_report_result\" \/><\/p>\n<p>\n\n<\/p>\n<p>\n\n<\/p>\n<p>\n\n<\/p>\n<h2>Scheduling the Report<\/h2>\n<p>The scheduling of this report is managed through AAP\/AWX. These tools execute the playbook on a predefined schedule and deliver the report directly via mail.<\/p>\n<p>It&#8217;s important to note that I haven&#8217;t covered what happens if the report cannot obtain data. You can handle this logic inside the playbook, or you can take advantage of the workflow functionality in AAP\/AWX, which allows you to execute a different playbook if this one fails. This flexibility enables you to create a workflow that suits your specific requirements.<\/p>\n<p>\n\n<\/p>\n<p>\n\n<\/p>\n<p>\n\n<\/p>\n<h2>Power of Ansible<\/h2>\n<p>In the world of automation, Ansible stands out as a powerful and versatile tool.<br \/>\nIt offers the flexibility to adapt to your unique requirements.<br \/>\nWith a touch of creativity, creating automated reporting with Ansible becomes a straightforward process using just a few Ansible modules.<br \/>\nYou can even explore the possibility of extending this approach to handle more complex logic or <a href=\"https:\/\/www.cloudwerkstatt.com\/en\/a-beginners-guide-to-building-a-custom-ansible-module-with-python-requests\/\">creating custom modules<\/a> for data gathering and processing.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Automate Reporting with Ansible Ansible is a powerful tool known for its capabilities in configuration management and application deployment. However, it can be extended to handle another essential task: automated reporting. Leveraging Ansible&#8217;s modules and automation capabilities, you can simplify the process of generating reports. In this post, I will guide you on how to [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":3082,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[32],"tags":[],"dipi_cpt_category":[],"class_list":["post-3081","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-en"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Automate Reporting with Ansible - cloudWerkstatt - deine IT Helden<\/title>\n<meta name=\"description\" content=\"Unlock new possibilities with Ansible, automating the generation of HTML reports and receiving them directly in your mailbox.\" \/>\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.cloudwerkstatt.com\/en\/automate-reporting-with-ansible\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Automate Reporting with Ansible - cloudWerkstatt - deine IT Helden\" \/>\n<meta property=\"og:description\" content=\"Unlock new possibilities with Ansible, automating the generation of HTML reports and receiving them directly in your mailbox.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.cloudwerkstatt.com\/en\/automate-reporting-with-ansible\/\" \/>\n<meta property=\"og:site_name\" content=\"cloudWerkstatt - deine IT Helden\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-17T10:14:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-28T08:22:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.cloudwerkstatt.com\/wp-content\/uploads\/2023\/11\/automate_reporting_with_ansible.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"665\" \/>\n\t<meta property=\"og:image:height\" content=\"463\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Michal Vasko\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Michal Vasko\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/en\\\/automate-reporting-with-ansible\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/en\\\/automate-reporting-with-ansible\\\/\"},\"author\":{\"name\":\"Michal Vasko\",\"@id\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/en\\\/#\\\/schema\\\/person\\\/53bd471b478d554f5a5c3e34db52cf9f\"},\"headline\":\"Automate Reporting with Ansible\",\"datePublished\":\"2023-11-17T10:14:32+00:00\",\"dateModified\":\"2023-11-28T08:22:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/en\\\/automate-reporting-with-ansible\\\/\"},\"wordCount\":1119,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/en\\\/automate-reporting-with-ansible\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/automate_reporting_with_ansible.jpeg\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.cloudwerkstatt.com\\\/en\\\/automate-reporting-with-ansible\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/en\\\/automate-reporting-with-ansible\\\/\",\"url\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/en\\\/automate-reporting-with-ansible\\\/\",\"name\":\"Automate Reporting with Ansible - cloudWerkstatt - deine IT Helden\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/en\\\/automate-reporting-with-ansible\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/en\\\/automate-reporting-with-ansible\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/automate_reporting_with_ansible.jpeg\",\"datePublished\":\"2023-11-17T10:14:32+00:00\",\"dateModified\":\"2023-11-28T08:22:25+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/en\\\/#\\\/schema\\\/person\\\/53bd471b478d554f5a5c3e34db52cf9f\"},\"description\":\"Unlock new possibilities with Ansible, automating the generation of HTML reports and receiving them directly in your mailbox.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/en\\\/automate-reporting-with-ansible\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.cloudwerkstatt.com\\\/en\\\/automate-reporting-with-ansible\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/en\\\/automate-reporting-with-ansible\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/automate_reporting_with_ansible.jpeg\",\"contentUrl\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/automate_reporting_with_ansible.jpeg\",\"width\":665,\"height\":463,\"caption\":\"automate_reporting_with_ansible\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/en\\\/automate-reporting-with-ansible\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Automate Reporting with Ansible\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/en\\\/\",\"name\":\"cloudWerkstatt - deine IT Helden\",\"description\":\"We empower your digital transformation\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/en\\\/#\\\/schema\\\/person\\\/53bd471b478d554f5a5c3e34db52cf9f\",\"name\":\"Michal Vasko\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c0af3790f5053e71e2a8811a0414067120622c113ec62b6f28f98f189b2e6198?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c0af3790f5053e71e2a8811a0414067120622c113ec62b6f28f98f189b2e6198?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c0af3790f5053e71e2a8811a0414067120622c113ec62b6f28f98f189b2e6198?s=96&d=mm&r=g\",\"caption\":\"Michal Vasko\"},\"url\":\"https:\\\/\\\/www.cloudwerkstatt.com\\\/en\\\/author\\\/mvasko\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Automate Reporting with Ansible - cloudWerkstatt - deine IT Helden","description":"Unlock new possibilities with Ansible, automating the generation of HTML reports and receiving them directly in your mailbox.","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.cloudwerkstatt.com\/en\/automate-reporting-with-ansible\/","og_locale":"en_US","og_type":"article","og_title":"Automate Reporting with Ansible - cloudWerkstatt - deine IT Helden","og_description":"Unlock new possibilities with Ansible, automating the generation of HTML reports and receiving them directly in your mailbox.","og_url":"https:\/\/www.cloudwerkstatt.com\/en\/automate-reporting-with-ansible\/","og_site_name":"cloudWerkstatt - deine IT Helden","article_published_time":"2023-11-17T10:14:32+00:00","article_modified_time":"2023-11-28T08:22:25+00:00","og_image":[{"width":665,"height":463,"url":"https:\/\/www.cloudwerkstatt.com\/wp-content\/uploads\/2023\/11\/automate_reporting_with_ansible.jpeg","type":"image\/jpeg"}],"author":"Michal Vasko","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Michal Vasko","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.cloudwerkstatt.com\/en\/automate-reporting-with-ansible\/#article","isPartOf":{"@id":"https:\/\/www.cloudwerkstatt.com\/en\/automate-reporting-with-ansible\/"},"author":{"name":"Michal Vasko","@id":"https:\/\/www.cloudwerkstatt.com\/en\/#\/schema\/person\/53bd471b478d554f5a5c3e34db52cf9f"},"headline":"Automate Reporting with Ansible","datePublished":"2023-11-17T10:14:32+00:00","dateModified":"2023-11-28T08:22:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.cloudwerkstatt.com\/en\/automate-reporting-with-ansible\/"},"wordCount":1119,"commentCount":0,"image":{"@id":"https:\/\/www.cloudwerkstatt.com\/en\/automate-reporting-with-ansible\/#primaryimage"},"thumbnailUrl":"https:\/\/www.cloudwerkstatt.com\/wp-content\/uploads\/2023\/11\/automate_reporting_with_ansible.jpeg","articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.cloudwerkstatt.com\/en\/automate-reporting-with-ansible\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.cloudwerkstatt.com\/en\/automate-reporting-with-ansible\/","url":"https:\/\/www.cloudwerkstatt.com\/en\/automate-reporting-with-ansible\/","name":"Automate Reporting with Ansible - cloudWerkstatt - deine IT Helden","isPartOf":{"@id":"https:\/\/www.cloudwerkstatt.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.cloudwerkstatt.com\/en\/automate-reporting-with-ansible\/#primaryimage"},"image":{"@id":"https:\/\/www.cloudwerkstatt.com\/en\/automate-reporting-with-ansible\/#primaryimage"},"thumbnailUrl":"https:\/\/www.cloudwerkstatt.com\/wp-content\/uploads\/2023\/11\/automate_reporting_with_ansible.jpeg","datePublished":"2023-11-17T10:14:32+00:00","dateModified":"2023-11-28T08:22:25+00:00","author":{"@id":"https:\/\/www.cloudwerkstatt.com\/en\/#\/schema\/person\/53bd471b478d554f5a5c3e34db52cf9f"},"description":"Unlock new possibilities with Ansible, automating the generation of HTML reports and receiving them directly in your mailbox.","breadcrumb":{"@id":"https:\/\/www.cloudwerkstatt.com\/en\/automate-reporting-with-ansible\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.cloudwerkstatt.com\/en\/automate-reporting-with-ansible\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.cloudwerkstatt.com\/en\/automate-reporting-with-ansible\/#primaryimage","url":"https:\/\/www.cloudwerkstatt.com\/wp-content\/uploads\/2023\/11\/automate_reporting_with_ansible.jpeg","contentUrl":"https:\/\/www.cloudwerkstatt.com\/wp-content\/uploads\/2023\/11\/automate_reporting_with_ansible.jpeg","width":665,"height":463,"caption":"automate_reporting_with_ansible"},{"@type":"BreadcrumbList","@id":"https:\/\/www.cloudwerkstatt.com\/en\/automate-reporting-with-ansible\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.cloudwerkstatt.com\/en\/"},{"@type":"ListItem","position":2,"name":"Automate Reporting with Ansible"}]},{"@type":"WebSite","@id":"https:\/\/www.cloudwerkstatt.com\/en\/#website","url":"https:\/\/www.cloudwerkstatt.com\/en\/","name":"cloudWerkstatt - deine IT Helden","description":"We empower your digital transformation","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.cloudwerkstatt.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.cloudwerkstatt.com\/en\/#\/schema\/person\/53bd471b478d554f5a5c3e34db52cf9f","name":"Michal Vasko","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c0af3790f5053e71e2a8811a0414067120622c113ec62b6f28f98f189b2e6198?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c0af3790f5053e71e2a8811a0414067120622c113ec62b6f28f98f189b2e6198?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c0af3790f5053e71e2a8811a0414067120622c113ec62b6f28f98f189b2e6198?s=96&d=mm&r=g","caption":"Michal Vasko"},"url":"https:\/\/www.cloudwerkstatt.com\/en\/author\/mvasko\/"}]}},"_links":{"self":[{"href":"https:\/\/www.cloudwerkstatt.com\/en\/wp-json\/wp\/v2\/posts\/3081","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cloudwerkstatt.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cloudwerkstatt.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloudwerkstatt.com\/en\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloudwerkstatt.com\/en\/wp-json\/wp\/v2\/comments?post=3081"}],"version-history":[{"count":5,"href":"https:\/\/www.cloudwerkstatt.com\/en\/wp-json\/wp\/v2\/posts\/3081\/revisions"}],"predecessor-version":[{"id":3092,"href":"https:\/\/www.cloudwerkstatt.com\/en\/wp-json\/wp\/v2\/posts\/3081\/revisions\/3092"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cloudwerkstatt.com\/en\/wp-json\/wp\/v2\/media\/3082"}],"wp:attachment":[{"href":"https:\/\/www.cloudwerkstatt.com\/en\/wp-json\/wp\/v2\/media?parent=3081"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cloudwerkstatt.com\/en\/wp-json\/wp\/v2\/categories?post=3081"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cloudwerkstatt.com\/en\/wp-json\/wp\/v2\/tags?post=3081"},{"taxonomy":"dipi_cpt_category","embeddable":true,"href":"https:\/\/www.cloudwerkstatt.com\/en\/wp-json\/wp\/v2\/dipi_cpt_category?post=3081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}