{"id":6064,"date":"2025-02-02T04:08:31","date_gmt":"2025-02-02T04:08:31","guid":{"rendered":"https:\/\/linuxbuz.com\/?p=6064"},"modified":"2025-07-11T04:46:35","modified_gmt":"2025-07-11T04:46:35","slug":"ansible-block-module","status":"publish","type":"post","link":"https:\/\/linuxbuz.com\/devops\/ansible-block-module","title":{"rendered":"Group Multiple Tasks Using Ansible Block Module"},"content":{"rendered":"<p style=\"text-align: justify;\"><a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/playbook_guide\/playbooks_blocks.html\" target=\"_blank\" rel=\"noopener\"><strong>Ansible&#8217;s block module<\/strong><\/a> is a powerful feature that allows you to group a set of tasks together. Blocks can be used for error handling, running a series of tasks under certain conditions, or organizing related tasks for better readability.<\/p>\n<p style=\"text-align: justify;\"><em>In this guide, we&#8217;ll explore the block module in depth, focusing on real-world practical use cases to illustrate its utility.<\/em><\/p>\n<div class=\"su-box su-box-style-default\" id=\"\" style=\"border-color:#001a66;border-radius:3px;max-width:none\"><div class=\"su-box-title\" style=\"background-color:#004d99;color:#FFFFFF;border-top-left-radius:1px;border-top-right-radius:1px\">\ud83d\udca1 Recommended Reading<\/div><div class=\"su-box-content su-u-clearfix su-u-trim\" style=\"border-bottom-left-radius:1px;border-bottom-right-radius:1px\">\n\ud83d\udc49 <a href=\"https:\/\/linuxbuz.com\/linuxhowto\/how-to-get-free-cloud-vps-server-step-by-step-guide\" target=\"_blank\" rel=\"noopener\">How to Get a Free Cloud Server for Testing<\/a><br \/>\n<\/div><\/div>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/linuxbuz.com\/devops\/ansible-block-module\/#Introduction_to_Ansible_Block_Module\" >Introduction to Ansible Block Module<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/linuxbuz.com\/devops\/ansible-block-module\/#Basic_Structure_of_a_Block\" >Basic Structure of a Block<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/linuxbuz.com\/devops\/ansible-block-module\/#Example_1_Database_Setup\" >Example 1: Database Setup<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/linuxbuz.com\/devops\/ansible-block-module\/#Example_2_Application_Deployment\" >Example 2: Application Deployment<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/linuxbuz.com\/devops\/ansible-block-module\/#Example_3_System_Configuration\" >Example 3: System Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/linuxbuz.com\/devops\/ansible-block-module\/#Example_4_Conditional_Package_Installation_Based_on_OS_Type\" >Example 4: Conditional Package Installation Based on OS Type<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/linuxbuz.com\/devops\/ansible-block-module\/#Example_5_Looping_Through_Users_to_Configure_SSH_Access\" >Example 5: Looping Through Users to Configure SSH Access<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/linuxbuz.com\/devops\/ansible-block-module\/#Conclusion\" >Conclusion<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/linuxbuz.com\/devops\/ansible-block-module\/#FAQs\" >FAQs<\/a><\/li><\/ul><\/nav><\/div>\n\n<h2><span class=\"ez-toc-section\" id=\"Introduction_to_Ansible_Block_Module\"><\/span>Introduction to Ansible Block Module<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">The <strong>block module<\/strong> in Ansible enables you to group multiple tasks into a single logical block. This grouping can be beneficial in various scenarios, such as:<\/p>\n<ul>\n<li style=\"text-align: justify;\"><strong>Error Handling<\/strong>: Use block with rescue and always, to define actions for failure and cleanup.<\/li>\n<li style=\"text-align: justify;\"><strong>Conditional Execution<\/strong>: Run a group of tasks based on certain conditions.<\/li>\n<li style=\"text-align: justify;\"><strong>Organizational Clarity<\/strong>: Keep related tasks together, improving the playbook&#8217;s readability and maintainability.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Basic_Structure_of_a_Block\"><\/span>Basic Structure of a Block<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>A block can contain multiple tasks, rescue, and always sections:<\/p>\n<ul>\n<li><strong>block:<\/strong> The main section containing the tasks.<\/li>\n<li><strong>rescue:<\/strong> Tasks that run if any task in the block fails.<\/li>\n<li style=\"text-align: justify;\"><strong>always:<\/strong> Ensures that tasks run after the block are completes, no matter if it was successful or not.<\/li>\n<\/ul>\n<h3>Syntax and Basic Usage<\/h3>\n<p>Here&#8217;s a basic example of the block module:<\/p>\n<pre style=\"background-color: #262626; color: white; border-radius: 7px; overflow: auto;\"><code>- name: Basic usage of block\r\n  hosts: all\r\n  tasks:\r\n    - block:\r\n        - name: Task 1\r\n          debug:\r\n            msg: \"This is task 1\"\r\n\r\n        - name: Task 2\r\n          debug:\r\n            msg: \"This is task 2\"\r\n      rescue:\r\n        - name: Handle failure\r\n          debug:\r\n            msg: \"Something went wrong!\"\r\n      always:\r\n        - name: Always run this\r\n          debug:\r\n            msg: \"This task runs always\"<\/code><\/pre>\n<p>In this <a href=\"https:\/\/linuxbuz.com\/devops\/ansible-playbooks-examples\" target=\"_blank\" rel=\"noopener\"><strong>example playbook<\/strong><\/a>:<\/p>\n<ul>\n<li style=\"text-align: justify;\"><strong>block<\/strong> contains tasks that will be executed together.<\/li>\n<li style=\"text-align: justify;\"><strong>rescue<\/strong> section contains tasks that will be executed if any task within the block fails.<\/li>\n<li style=\"text-align: justify;\"><strong>always<\/strong> section contains tasks that will always be executed, regardless of success or failure.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Example_1_Database_Setup\"><\/span>Example 1: Database Setup<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">Let&#8217;s consider a scenario where you need to set up a database server. This involves installing the database software, configuring it, and ensuring it&#8217;s running. If any part of this process fails, you might want to clean up partial installations.<\/p>\n<pre style=\"background-color: #262626; color: white; border-radius: 7px; overflow: auto;\"><code>- name: Database setup with block\r\n  hosts: database_servers\r\n  tasks:\r\n    - block:\r\n        - name: Install PostgreSQL\r\n          apt:\r\n            name: postgresql\r\n            state: present\r\n\r\n        - name: Configure PostgreSQL\r\n          template:\r\n            src: templates\/postgresql.conf.j2\r\n            dest: \/etc\/postgresql\/13\/main\/postgresql.conf\r\n\r\n        - name: Start PostgreSQL service\r\n          systemd:\r\n            name: postgresql\r\n            state: started\r\n            enabled: yes\r\n      rescue:\r\n        - name: Remove partially installed PostgreSQL\r\n          apt:\r\n            name: postgresql\r\n            state: absent\r\n      always:\r\n        - name: Ensure system is updated\r\n          apt:\r\n            update_cache: yes<\/code><\/pre>\n<p>In this example:<\/p>\n<ul>\n<li style=\"text-align: justify;\"><strong>block<\/strong> ensures that PostgreSQL is installed, configured, and started.<\/li>\n<li style=\"text-align: justify;\"><strong>rescue<\/strong> section ensures that if any task fails, PostgreSQL is removed to clean up the system.<\/li>\n<li style=\"text-align: justify;\"><strong>always<\/strong> section updates the package cache.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Example_2_Application_Deployment\"><\/span>Example 2: Application Deployment<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">Consider deploying a web application where you must pull the latest code, install dependencies, and restart the web service.<\/p>\n<pre style=\"background-color: #262626; color: white; border-radius: 7px; overflow: auto;\"><code>- name: Web application deployment\r\n  hosts: web_servers\r\n  tasks:\r\n    - block:\r\n        - name: Pull latest code from Git\r\n          git:\r\n            repo: 'https:\/\/github.com\/example\/app.git'\r\n            dest: \/var\/www\/app\r\n            version: master\r\n\r\n        - name: Install dependencies\r\n          pip:\r\n            requirements: \/var\/www\/app\/requirements.txt\r\n\r\n        - name: Restart web service\r\n          systemd:\r\n            name: my_web_service\r\n            state: restarted\r\n      rescue:\r\n        - name: Roll back to previous release\r\n          git:\r\n            repo: 'https:\/\/github.com\/example\/app.git'\r\n            dest: \/var\/www\/app\r\n            version: previous_release\r\n      always:\r\n        - name: Ensure web service is running\r\n          systemd:\r\n            name: my_web_service\r\n            state: started\r\n            enabled: yes<\/code><\/pre>\n<p>In this example:<\/p>\n<ul>\n<li style=\"text-align: justify;\"><strong>block<\/strong> includes tasks to <a href=\"https:\/\/linuxbuz.com\/devops\/clone-a-git-repository-using-ansible-git-module\" target=\"_blank\" rel=\"noopener\"><strong>pull the latest code<\/strong><\/a>, install dependencies, and restart the web service.<\/li>\n<li style=\"text-align: justify;\"><strong>rescue<\/strong> section rolls back to the previous release if any task fails.<\/li>\n<li style=\"text-align: justify;\"><strong>always<\/strong> section <a href=\"https:\/\/linuxbuz.com\/devops\/ansible-service-module#Checking_Service_Status\" target=\"_blank\" rel=\"noopener\"><strong>ensures that the web service is running<\/strong><\/a>.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Example_3_System_Configuration\"><\/span>Example 3: System Configuration<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">Imagine you want to configure NTP service on multiple hosts and ensure they are running. If any configuration fails, you want to revert changes.<\/p>\n<p style=\"text-align: justify;\">The following playbook configures and starts the NTP service on all remote hosts.<\/p>\n<pre style=\"background-color: #262626; color: white; border-radius: 7px; overflow: auto;\"><code>- name: System configuration with block\r\n  hosts: all\r\n  tasks:\r\n    - block:\r\n        - name: Configure NTP\r\n          template:\r\n            src: templates\/ntp.conf.j2\r\n            dest: \/etc\/ntp.conf\r\n\r\n        - name: Start NTP service\r\n          systemd:\r\n            name: ntp\r\n            state: started\r\n            enabled: yes\r\n\r\n        - name: Configure Firewall\r\n          ufw:\r\n            rule: allow\r\n            name: 'NTP'\r\n            port: 123\r\n            proto: udp\r\n      rescue:\r\n        - name: Revert NTP configuration\r\n          command: mv \/etc\/ntp.conf.bak \/etc\/ntp.conf\r\n      always:\r\n        - name: Ensure firewall is enabled\r\n          ufw:\r\n            state: enabled<\/code><\/pre>\n<p>In this example:<\/p>\n<ul>\n<li style=\"text-align: justify;\"><strong>block<\/strong> contains tasks to configure NTP, start the NTP service using <a href=\"https:\/\/linuxbuz.com\/devops\/ansible-systemd-module-examples\" target=\"_blank\" rel=\"noopener\"><strong>systemd module<\/strong><\/a>, and configure the firewall.<\/li>\n<li style=\"text-align: justify;\"><strong>rescue<\/strong> section reverts the NTP configuration if any task fails.<\/li>\n<li style=\"text-align: justify;\"><strong>always<\/strong> section ensures that the firewall is enabled.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Example_4_Conditional_Package_Installation_Based_on_OS_Type\"><\/span>Example 4: Conditional Package Installation Based on OS Type<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">In a scenario where you manage multiple different Linux servers and want to install packages conditionally based on the operating system type,<\/p>\n<p style=\"text-align: justify;\">Here is an example playbook that uses the <a href=\"https:\/\/linuxbuz.com\/devops\/ansible-when-conditionals\" target=\"_blank\" rel=\"noopener\"><strong>when conditionals<\/strong><\/a> to install packages based on operating system type.<\/p>\n<pre style=\"background-color: #262626; color: white; border-radius: 7px; overflow: auto;\"><code>- name: Install packages conditionally based on OS\r\n  hosts: all\r\n  tasks:\r\n    - block:\r\n        - name: Install Apache on Debian-based systems\r\n          apt:\r\n            name: apache2\r\n            state: present\r\n          when: ansible_os_family == \"Debian\"\r\n\r\n        - name: Install Apache on RedHat-based systems\r\n          yum:\r\n            name: httpd\r\n            state: present\r\n          when: ansible_os_family == \"RedHat\"\r\n\r\n        - name: Start Apache service\r\n          service:\r\n            name: \"{{ 'apache2' if ansible_os_family == 'Debian' else 'httpd' }}\"\r\n            state: started\r\n            enabled: yes\r\n      rescue:\r\n        - name: Handle failure in package installation\r\n          debug:\r\n            msg: \"Failed to install Apache. Please check the logs.\"\r\n      always:\r\n        - name: Ensure that the package manager cache is up-to-date\r\n          shell: \"{{ 'apt-get update' if ansible_os_family == 'Debian' else 'yum update -y' }}\"\r\n          ignore_errors: yes<\/code><\/pre>\n<p>In this example:<\/p>\n<ul>\n<li style=\"text-align: justify;\"><strong>block<\/strong> installs and starts Apache based on the operating system type.<\/li>\n<li style=\"text-align: justify;\"><strong>rescue<\/strong> section logs an error message if the installation fails.<\/li>\n<li style=\"text-align: justify;\"><strong>always<\/strong> section updates the package manager cache regardless of the outcome.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Example_5_Looping_Through_Users_to_Configure_SSH_Access\"><\/span>Example 5: Looping Through Users to Configure SSH Access<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">Suppose you need to ensure that a list of users has the correct SSH configuration on a set of servers. You can use <a href=\"https:\/\/linuxbuz.com\/devops\/ansible-loops-example\" target=\"_blank\" rel=\"noopener\"><strong>loops<\/strong><\/a> within a block to iterate over each user and apply the necessary configurations.<\/p>\n<pre style=\"background-color: #262626; color: white; border-radius: 7px; overflow: auto;\"><code>- name: Configure SSH access for multiple users\r\n  hosts: all\r\n  vars:\r\n    users:\r\n      - { name: 'alice', ssh_key: 'alice_public_key' }\r\n      - { name: 'bob', ssh_key: 'bob_public_key' }\r\n      - { name: 'charlie', ssh_key: 'charlie_public_key' }\r\n  tasks:\r\n    - block:\r\n        - name: Create users\r\n          user:\r\n            name: \"{{ item.name }}\"\r\n            state: present\r\n          loop: \"{{ users }}\"\r\n\r\n        - name: Set up SSH key for users\r\n          authorized_key:\r\n            user: \"{{ item.name }}\"\r\n            key: \"{{ lookup('file', item.ssh_key) }}\"\r\n            state: present\r\n          loop: \"{{ users }}\"\r\n      rescue:\r\n        - name: Log user creation failure\r\n          debug:\r\n            msg: \"Failed to create or configure SSH for some users.\"\r\n      always:\r\n        - name: Ensure SSH service is running\r\n          service:\r\n            name: ssh\r\n            state: started\r\n            enabled: yes<\/code><\/pre>\n<p>In this example:<\/p>\n<ul>\n<li style=\"text-align: justify;\"><strong>block<\/strong> creates user accounts and <a href=\"https:\/\/linuxbuz.com\/devops\/ansible-authorized_key-module\" target=\"_blank\" rel=\"noopener\"><strong>sets up SSH keys<\/strong><\/a> for each user in the list.<\/li>\n<li style=\"text-align: justify;\"><strong>rescue<\/strong> section logs an error if user creation or SSH key setup fails.<\/li>\n<li style=\"text-align: justify;\"><strong>always<\/strong> section ensures the SSH service is running.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\"><strong>Ansible&#8217;s block module<\/strong> is the best tool for grouping tasks and applying common error handling and properties. By using blocks, you can make your playbooks more robust and easier to maintain. This guide has provided an overview of the block module and demonstrated its usage with practical examples.<\/p>\n<p style=\"text-align: justify;\" data-pm-slice=\"0 0 []\">Start optimizing your playbooks today by leveraging <a href=\"https:\/\/linuxbuz.com\/devops\/ansible-tags-examples\" target=\"_blank\" rel=\"noopener\"><strong>tags<\/strong><\/a> with the <strong>Ansible block module<\/strong> to streamline your tasks and improve efficiency!<\/p>\n<h2><span class=\"ez-toc-section\" id=\"FAQs\"><\/span>FAQs<span class=\"ez-toc-section-end\"><\/span><\/h2>\n        <section class=\"sc_fs_faq sc_card \">\n            <div>\n\t\t\t\t<h6>1. Can I apply error handling to a block of tasks?<\/h6>                <div>\n\t\t\t\t\t                    <p>\n\t\t\t\t\t\tYes, you can use rescue and always clauses with blocks to handle errors and ensure certain tasks run regardless of success or failure.                    <\/p>\n                <\/div>\n            <\/div>\n        <\/section>\n\t\t        <section class=\"sc_fs_faq sc_card \">\n            <div>\n\t\t\t\t<h6>2. Is it possible to use conditionals with a block?<\/h6>                <div>\n\t\t\t\t\t                    <p>\n\t\t\t\t\t\tYes, you can use the <strong>when<\/strong> condition to execute a block only when specified conditions are met.                    <\/p>\n                <\/div>\n            <\/div>\n        <\/section>\n\t\t        <section class=\"sc_fs_faq sc_card \">\n            <div>\n\t\t\t\t<h6>3. What happens if a task within a block fails?<\/h6>                <div>\n\t\t\t\t\t                    <p>\n\t\t\t\t\t\tIf a task fails and you have defined a <strong>rescue<\/strong> clause, Ansible will execute the tasks in that clause, allowing for recovery or alternative actions.                    <\/p>\n                <\/div>\n            <\/div>\n        <\/section>\n\t\t        <section class=\"sc_fs_faq sc_card \">\n            <div>\n\t\t\t\t<h6>4. Can I apply tags to a block of tasks?<\/h6>                <div>\n\t\t\t\t\t                    <p>\n\t\t\t\t\t\tYes, you can assign tags to a block, allowing you to run only specific blocks when executing the playbook.                    <\/p>\n                <\/div>\n            <\/div>\n        <\/section>\n\t\t\n<script type=\"application\/ld+json\">\n    {\n\t\t\"@context\": \"https:\/\/schema.org\",\n\t\t\"@type\": \"FAQPage\",\n\t\t\"mainEntity\": [\n\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"1. Can I apply error handling to a block of tasks?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"Yes, you can use rescue and always clauses with blocks to handle errors and ensure certain tasks run regardless of success or failure.\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"2. Is it possible to use conditionals with a block?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"Yes, you can use the <strong>when<\/strong> condition to execute a block only when specified conditions are met.\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"3. What happens if a task within a block fails?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"If a task fails and you have defined a <strong>rescue<\/strong> clause, Ansible will execute the tasks in that clause, allowing for recovery or alternative actions.\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"4. Can I apply tags to a block of tasks?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"Yes, you can assign tags to a block, allowing you to run only specific blocks when executing the playbook.\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t\t    ]\n}\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>Ansible&#8217;s block module is a powerful feature that allows you to group a set of tasks together. Blocks can be used for error handling, running a series of tasks under &hellip; <\/p>\n","protected":false},"author":1,"featured_media":6065,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"two_page_speed":[],"footnotes":""},"categories":[828],"tags":[],"class_list":["post-6064","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/linuxbuz.com\/wp-json\/wp\/v2\/posts\/6064","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxbuz.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxbuz.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxbuz.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxbuz.com\/wp-json\/wp\/v2\/comments?post=6064"}],"version-history":[{"count":3,"href":"https:\/\/linuxbuz.com\/wp-json\/wp\/v2\/posts\/6064\/revisions"}],"predecessor-version":[{"id":6660,"href":"https:\/\/linuxbuz.com\/wp-json\/wp\/v2\/posts\/6064\/revisions\/6660"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxbuz.com\/wp-json\/wp\/v2\/media\/6065"}],"wp:attachment":[{"href":"https:\/\/linuxbuz.com\/wp-json\/wp\/v2\/media?parent=6064"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxbuz.com\/wp-json\/wp\/v2\/categories?post=6064"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxbuz.com\/wp-json\/wp\/v2\/tags?post=6064"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}