{"id":127394,"date":"2025-04-25T10:23:30","date_gmt":"2025-04-25T10:23:30","guid":{"rendered":"\/tutorials\/?p=127394"},"modified":"2026-03-09T19:16:38","modified_gmt":"2026-03-09T19:16:38","slug":"how-to-use-ansible-to-install-docker","status":"publish","type":"post","link":"\/ng\/tutorials\/how-to-use-ansible-to-install-docker","title":{"rendered":"How to install Docker using Ansible on Ubuntu"},"content":{"rendered":"<?xml encoding=\"utf-8\" ?><p>Installing Docker manually works fine &ndash; until you have to do it more than once. That&rsquo;s precisely the kind of problem Ansible was made to solve. With Ansible, you can automate Docker setup and keep the configuration consistent across every server you manage.<\/p><p><strong>Docker <\/strong>is a platform for running applications in fast, lightweight, and portable environments called <strong>containers<\/strong> that run independently from the host system. <strong>Ansible <\/strong>is a tool designed to automate the setup of those environments so you don&rsquo;t have to do it manually every time.<\/p><p>Ansible uses a simple text file called a <strong>playbook<\/strong> where you define your server configuration. This can include everything from installing packages to setting up various services. There&rsquo;s no coding required &ndash; just write your playbook once, and Ansible will apply it precisely the same way every time you run it.<\/p><p>This guide will show you how to use Ansible to install Docker on an Ubuntu server. You&rsquo;ll learn to configure Ansible, create an inventory file, write a playbook, and run it to install and configure Docker automatically. Along the way, you&rsquo;ll also learn how to verify your setup and customize it for more advanced use cases.<\/p><p>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-prerequisites\">Prerequisites<\/h2><p>Before you get started, make sure you have:<\/p><ul class=\"wp-block-list\">\n<li><strong>An Ubuntu server<\/strong> &ndash; version 20.04 or later. Hostinger offers <a href=\"\/ng\/vps\/ubuntu-hosting\">Ubuntu VPS hosting<\/a> that is quick and easy to set up.<\/li>\n\n\n\n<li><strong>Basic command line knowledge<\/strong> &ndash; you don&rsquo;t need to be an expert, but you should be comfortable using the terminal.<\/li>\n\n\n\n<li><strong>A user with sudo privileges<\/strong> &ndash; required for installing packages and running Ansible tasks.<\/li>\n\n\n\n<li><strong>SSH access<\/strong> &ndash; to connect to your remote server.<\/li>\n<\/ul><p>That should cover everything you&rsquo;ll need. The rest will be handled step by step in the guide.<\/p><?xml encoding=\"utf-8\" ?><figure class=\"wp-block-image size-large\"><a class=\"hgr-tutorials-cta hgr-tutorials-cta-vps-hosting\" href=\"\/ng\/vps-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/public\" alt=\"\" class=\"wp-image-77934\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><h2 class=\"wp-block-heading\" id=\"h-how-to-use-ansible-to-install-docker\">How to use Ansible to install Docker<\/h2><p>This process is divided into six steps, from setting up Ansible to customizing the playbook. Let&rsquo;s start with installing and configuring Ansible.<\/p><h3 class=\"wp-block-heading\" id=\"h-1-install-and-configure-ansible\">1. Install and configure Ansible<\/h3><p>Before you can install Docker with Ansible, you&rsquo;ll need to set up Ansible itself. For this tutorial, you&rsquo;ll install it on the same server where you plan to install Docker &ndash; this machine will act as both the control node and the one being managed. Having everything happen on a single server keeps things simple if you&rsquo;re just getting started or working with a VPS.<\/p><p>To begin, <a href=\"https:\/\/support.hostinger.com\/en\/articles\/5723772-how-to-connect-to-your-vps-via-ssh\">connect to your Ubuntu server via SSH<\/a>. Once connected, you&rsquo;ll need to update the system&rsquo;s package list. This step makes sure your server has the latest available software and security patches:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt update<\/pre><p>Running this command doesn&rsquo;t install anything. It simply refreshes the list of packages your system can access &ndash; a quick step that helps avoid issues during the Ansible installation.<\/p><p>Now you&rsquo;re ready to install Ansible. Ubuntu includes it in its standard software libraries, so installation is straightforward:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt install ansible -y<\/pre><p>This command installs the main Ansible tool and everything it needs to run.<\/p><p>Once that&rsquo;s done, it&rsquo;s a good idea to check that Ansible was installed correctly:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ansible --version<\/pre><p>You should see version details on the screen. If you do, you&rsquo;re ready to move forward.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1adb8d36d4\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1460\" height=\"108\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/ansible-version.png\/public\" alt=\"Printing out Ansible version using a terminal.\" class=\"wp-image-127399\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/ansible-version.png\/w=1460,fit=scale-down 1460w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/ansible-version.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/ansible-version.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/ansible-version.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/ansible-version.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1460px) 100vw, 1460px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>That&rsquo;s it. With Ansible in place, you&rsquo;re ready to configure which servers it will manage in the next step.<\/p><h3 class=\"wp-block-heading\" id=\"h-2-set-up-the-inventory-file\">2. Set up the inventory file<\/h3><p>Ansible uses an <strong>inventory file<\/strong> to know which servers it should manage. Think of it as a list of hosts that Ansible can connect to and run tasks on. Even if you&rsquo;re only going to be managing one server, like in this tutorial, you&rsquo;ll still need to define it in the inventory.<\/p><p>By default, the inventory file is located at <strong>\/etc\/ansible\/hosts<\/strong>. You can edit this file directly or create your own. For this guide, we&rsquo;ll create a simple custom inventory file in your working directory to keep things organized.<\/p><p>Create a file called <strong>hosts.ini<\/strong>:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">nano hosts.ini<\/pre><p>Then, add the following:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[local]\nlocalhost ansible_connection=local<\/pre><p>Here&rsquo;s what this means:<\/p><ul class=\"wp-block-list\">\n<li><strong>[local]<\/strong> is the name of the group. You can name groups however you like.<br><\/li>\n\n\n\n<li><strong>localhost <\/strong>tells Ansible to run tasks on the same machine.<br><\/li>\n\n\n\n<li><strong>ansible_connection=local<\/strong> tells Ansible to skip the SSH connection step because it&rsquo;s managing the same machine it&rsquo;s installed on.<\/li>\n<\/ul><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1adb8d611a\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1460\" height=\"829\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/hosts-ini-file-local.png\/public\" alt=\"Hosts file containing localhost connection details opened in nano text editor.\" class=\"wp-image-127400\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/hosts-ini-file-local.png\/w=1460,fit=scale-down 1460w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/hosts-ini-file-local.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/hosts-ini-file-local.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/hosts-ini-file-local.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/hosts-ini-file-local.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1460px) 100vw, 1460px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>If you want to manage multiple remote servers, your inventory must contain their <strong>IP addresses<\/strong> or <strong>hostnames<\/strong>. You would also need to specify the <strong>SSH connection type<\/strong> and the <strong>username <\/strong>of the remote host that Ansible would use for connection.<\/p><p><div><p class=\"important\"><strong>Important!<\/strong> To enhance security, we strongly recommend <a href=\"\/ng\/tutorials\/ssh\/how-to-set-up-ssh-keys\">using SSH keys<\/a> for Ansible SSH authentication between your control node and remote host.<\/p><\/div>\n\n\n\n<\/p><p>But for this guide, <strong>localhost <\/strong>is all you need. Be sure to replace &ldquo;server.hostname.tld&rdquo; with your own server address and &ldquo;username&rdquo; with your own username.<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[webservers]\n192.168.1.10\t\tansible_connection=ssh\tansible_user=username\nserver.hostname.tld \tansible_connection=ssh\tansible_user=username<\/pre><p>Save the file, then you&rsquo;re done setting up the inventory. Next, you&rsquo;ll write the playbook &ndash; the set of instructions that tells Ansible how to install Docker.<\/p><h3 class=\"wp-block-heading\" id=\"h-3-write-the-ansible-playbook\">3. Write the Ansible playbook<\/h3><p>Next, it&rsquo;s time to write the <strong>Ansible playbook<\/strong>, which contains a list of tasks Ansible will execute to install and configure Docker for you. Instead of manually entering commands one by one, you&rsquo;ll define everything in a structured format, and Ansible will handle the rest.<\/p><p>Create a file called<strong> install-docker.yml<\/strong>:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">nano install-docker.yml<\/pre><p>Then paste in the following content:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">- name: Install Docker on Ubuntu\n  hosts: local\n  become: true\n  tasks:\n    - name: Install required packages\n      apt:\n        name:\n          - apt-transport-https\n          - ca-certificates\n          - curl\n          - software-properties-common\n        state: present\n        update_cache: true\n\n    - name: Add Docker&rsquo;s official GPG key\n      apt_key:\n        url: https:\/\/download.docker.com\/linux\/ubuntu\/gpg\n        state: present\n\n    - name: Add Docker repository\n      apt_repository:\n        repo: deb https:\/\/download.docker.com\/linux\/ubuntu focal stable\n        state: present\n\n    - name: Install Docker\n      apt:\n        name: docker-ce\n        state: latest\n        update_cache: true\n<\/pre><p>Let&rsquo;s break it down:<\/p><ul class=\"wp-block-list\">\n<li><strong>name<\/strong> is a description of what the playbook is doing, making logs more readable.<\/li>\n\n\n\n<li><strong>hosts: local<\/strong> tells Ansible to run the tasks on the <strong>localhost <\/strong>group from your inventory.<\/li>\n\n\n\n<li><strong>become: true<\/strong> runs the tasks with admin privileges, just like using <strong>sudo <\/strong>in the terminal.<\/li>\n\n\n\n<li>Under <strong>tasks<\/strong>, each item is a step in the installation process.<\/li>\n<\/ul><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1adb8d8cab\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1460\" height=\"904\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/install-docker-file.png\/public\" alt=\"Final version of the Ansible playbook opened in nano text editor.\" class=\"wp-image-127401\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/install-docker-file.png\/w=1460,fit=scale-down 1460w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/install-docker-file.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/install-docker-file.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/install-docker-file.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/install-docker-file.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1460px) 100vw, 1460px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Here&rsquo;s what each of the <strong>tasks<\/strong> does:<\/p><ul class=\"wp-block-list\">\n<li><strong>Installing required packages<\/strong>. The playbook starts by installing a set of tools your system needs before it can install Docker.<br>These include:\n<ul class=\"wp-block-list\">\n<li><strong>curl <\/strong>for downloading files<\/li>\n\n\n\n<li><strong>apt-transport-https<\/strong> for accessing secure repositories<\/li>\n\n\n\n<li><strong>ca-certificates<\/strong> for handling SSL certificates<\/li>\n\n\n\n<li><strong>software-properties-common<\/strong>, which helps manage software sources<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Adding Docker&rsquo;s GNU Privacy Guard (GPG) key<\/strong>. This lets your system verify the authenticity of the Docker packages by adding Docker&rsquo;s official GPG key before installing them.<\/li>\n\n\n\n<li><strong>Adding Docker&rsquo;s repository<\/strong>. Switches to the official Docker repository instead of the built-in Ubuntu one. That way, your server will always install the latest stable release of Docker straight from the source.<\/li>\n\n\n\n<li><strong>Installing Docker itself<\/strong>. The playbook refreshes the package list one more time to ensure the latest version is pulled in, then installs it.<\/li>\n<\/ul><p>Writing the playbook this way ensures that Docker is installed in a consistent, repeatable manner, which is exactly what Ansible is designed for. You can reuse this file if you need to do it again on another Ubuntu machine.<\/p><p>Save and close the file &ndash; you&rsquo;re now ready to run the playbook.<\/p><h3 class=\"wp-block-heading\" id=\"h-4-run-the-ansible-playbook\">4. Run the Ansible playbook<\/h3><p>To execute the playbook, use the following command:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ansible-playbook -i hosts.ini install-docker.yml<\/pre><p>Here&rsquo;s what&rsquo;s happening in this command:<\/p><ul class=\"wp-block-list\">\n<li><strong>ansible-playbook<\/strong> is the Ansible tool used to run your playbook<\/li>\n\n\n\n<li><strong>-i hosts.ini<\/strong> tells Ansible to use the inventory file you created earlier<\/li>\n\n\n\n<li><strong>install-docker.yml<\/strong> is the playbook that contains your Docker installation steps<\/li>\n<\/ul><p>After you run the command, Ansible begins connecting to the server listed in your inventory. Since you&rsquo;re using <strong>localhost <\/strong>with <strong>ansible_connection=local<\/strong>, it doesn&rsquo;t use SSH. Instead, it runs the tasks directly on the same machine upon which Ansible is installed.<\/p><p>You&rsquo;ll see each task printed out in the terminal as it runs along with a success or failure message. This makes it easy to spot any issues and monitor progress.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1adb8db3ef\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1468\" height=\"611\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/running-ansible-playbook.png\/public\" alt=\"The output of a successful Ansible playbook run.\" class=\"wp-image-127402\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/running-ansible-playbook.png\/w=1468,fit=scale-down 1468w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/running-ansible-playbook.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/running-ansible-playbook.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/running-ansible-playbook.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/running-ansible-playbook.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1468px) 100vw, 1468px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Behind the scenes, Ansible checks if each task needs to be run or if it&rsquo;s already been completed. For example, if Docker is already installed on the target host, Ansible will skip that step. This is one of the key benefits of using Ansible: it only runs steps when they are needed.<\/p><p>Once the playbook finishes, Docker should be installed and ready to use. The next step is to make sure everything worked.<\/p><h3 class=\"wp-block-heading\" id=\"h-5-verify-the-installation\">5. Verify the installation<\/h3><p>Once the playbook finishes running, check if Docker was installed correctly. First, check the version to confirm that Docker is available:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">docker --version<\/pre><p>If the installation worked, you&rsquo;ll see the <strong>version number<\/strong> printed in the terminal.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1adb8ddc81\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1460\" height=\"108\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/docker-version.png\/public\" alt=\"Printing out the Docker version using a terminal.\" class=\"wp-image-127403\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/docker-version.png\/w=1460,fit=scale-down 1460w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/docker-version.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/docker-version.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/docker-version.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/docker-version.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1460px) 100vw, 1460px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Next, make sure the Docker service is running:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl status docker<\/pre><p>You should see a status of <strong>active (running)<\/strong>. Press <strong>q<\/strong> to exit the status screen.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1adb8e03b8\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1460\" height=\"408\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/docker-service-status.png\/public\" alt=\"Checking Docker service status.\" class=\"wp-image-127404\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/docker-service-status.png\/w=1460,fit=scale-down 1460w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/docker-service-status.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/docker-service-status.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/docker-service-status.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/docker-service-status.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1460px) 100vw, 1460px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Finally, run a quick test that pulls a small Docker image from Docker Hub, the default image registry, and runs it in a container:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo docker run hello-world<\/pre><p>If everything is set up successfully, you&rsquo;ll see a <strong>Hello from Docker!<\/strong> message printed out.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1adb8e2a6a\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1460\" height=\"220\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/docker-run-hello-world.png\/public\" alt=\"Testing Docker by running the hello-world image.\" class=\"wp-image-127405\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/docker-run-hello-world.png\/w=1460,fit=scale-down 1460w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/docker-run-hello-world.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/docker-run-hello-world.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/docker-run-hello-world.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2025\/04\/docker-run-hello-world.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1460px) 100vw, 1460px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>With Docker installed and verified, you&rsquo;re ready to customize your Ansible playbook.<\/p><h3 class=\"wp-block-heading\" id=\"h-6-customize-the-playbook\">6. Customize the playbook<\/h3><p>Now that you&rsquo;ve successfully installed Docker, you can expand your playbook to include additional tools and configurations.<\/p><p>One popular addition is <strong>Docker Compose<\/strong>. It allows you to define and run multi-container applications. To add it to your playbook, you could include a task that downloads the latest version and places it in your system&rsquo;s binary directory.<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">- name: Install Docker Compose\n\n&nbsp;&nbsp;get_url:\n\n&nbsp;&nbsp;&nbsp;&nbsp;url: https:\/\/github.com\/docker\/compose\/releases\/latest\/download\/docker-compose-linux-x86_64\n\n&nbsp;&nbsp;&nbsp;&nbsp;dest: \/usr\/local\/bin\/docker-compose\n\n&nbsp;&nbsp;&nbsp;&nbsp;mode: '0755'<\/pre><p><strong>Docker Swarm<\/strong> is another useful built-in Docker tool for more efficiently managing multiple containers across different servers. You can use Ansible to <a href=\"\/ng\/tutorials\/how-to-create-docker-swarm\">initialize Docker Swarm<\/a> or join nodes to an existing one.<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">- name: Initialize Docker Swarm\n  command: docker swarm init<\/pre><p>You can also configure Docker with custom settings. For example, you might want to set a custom storage driver or data directory, or specify how the Docker daemon communicates with a Docker host. These adjustments can be made by adding a task that edits the Docker daemon configuration file, typically located at <strong>\/etc\/docker\/daemon.json<\/strong>.<\/p><p>These are just a few ideas. The real advantage of using Ansible is that once you&rsquo;ve added these tasks to your playbook, they&rsquo;ll run automatically and consistently on any server you set up in the future.<\/p><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>Setting up Docker with Ansible isn&rsquo;t just about saving time. It&rsquo;s about making your setup repeatable and reliable. Instead of manually going through all the installation steps every time, you&rsquo;ll now have a playbook that does it all for you.<\/p><p>The best part? You&rsquo;re not locked into just the basics. Whether you&rsquo;re managing a single VPS or preparing for a more complex setup, this approach gives you a solid and flexible foundation. You can keep building your playbook over time by updating it and testing the changes as your setup evolves.<\/p><h2 class=\"wp-block-heading\" id=\"h-install-docker-using-ansible-faq\">Install Docker using Ansible FAQ<\/h2><div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1745570617492\"><h3 class=\"schema-faq-question\">What is Ansible, and how does it work with Docker?<\/h3> <p class=\"schema-faq-answer\">Ansible is a tool for automating tasks &ndash; like installing software &ndash; on one or more servers. It works with Docker by handling its setup for you. Instead of running commands manually, you can just write them in a playbook and let Ansible handle the rest.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1745570621569\"><h3 class=\"schema-faq-question\">Can this playbook be used for other Linux distributions?<\/h3> <p class=\"schema-faq-answer\">It can, with a few adjustments. This playbook is made specifically for Ubuntu, but the working principle is the same on other distributions. You&rsquo;ll need to change a few commands, especially ones that deal with package installation.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1745570626603\"><h3 class=\"schema-faq-question\">How do I manage multiple servers with Ansible?<\/h3> <p class=\"schema-faq-answer\">You can simply list all your servers in the inventory file. Ansible will connect to each of the servers (usually over SSH) and run the playbook on each of them. That&rsquo;s why Ansible is one of the easiest ways to handle installations and changes on multiple machines at once.&nbsp;<\/p> <\/div> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Installing Docker manually works fine &ndash; until you have to do it more than once. That&rsquo;s precisely the kind of problem Ansible was made to solve. With Ansible, you can automate Docker setup and keep the configuration consistent across every server you manage. Docker is a platform for running applications in fast, lightweight, and portable [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/ng\/tutorials\/how-to-use-ansible-to-install-docker\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":534,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to use Ansible to install Docker on Ubuntu","rank_math_description":"Check this article to learn how to use Ansible to install Docker on Ubuntu with this step-by-step guide, including detailed playbook examples.","rank_math_focus_keyword":"ansible install docker","footnotes":""},"categories":[22644],"tags":[],"class_list":["post-127394","post","type-post","status-publish","format-standard","hentry","category-vps"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/how-to-use-ansible-to-install-docker","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/how-to-use-ansible-to-install-docker","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/how-to-use-ansible-to-install-docker","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/how-to-use-ansible-to-install-docker","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-use-ansible-to-install-docker","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-use-ansible-to-install-docker","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-use-ansible-to-install-docker","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/how-to-use-ansible-to-install-docker","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/127394","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/users\/534"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/comments?post=127394"}],"version-history":[{"count":7,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/127394\/revisions"}],"predecessor-version":[{"id":143333,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/127394\/revisions\/143333"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/media?parent=127394"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/categories?post=127394"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/tags?post=127394"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}