{"id":73169,"date":"2019-10-03T10:54:56","date_gmt":"2019-10-03T10:54:56","guid":{"rendered":"https:\/\/www.whizlabs.com\/blog\/?p=73169"},"modified":"2021-03-15T12:18:54","modified_gmt":"2021-03-15T12:18:54","slug":"ansible-modules","status":"publish","type":"post","link":"https:\/\/www.whizlabs.com\/blog\/ansible-modules\/","title":{"rendered":"10 Ansible Modules You Need to Know"},"content":{"rendered":"<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\"><a href=\"https:\/\/www.whizlabs.com\/blog\/ansible-introduction\/\" target=\"_blank\" rel=\"noopener noreferrer\">Ansible<\/a> is a popular and widely uses open source IT configuration automation and management tool. The platform employs human-readable and easily understandable YAML templets. This lets the users program continuous tasks with the Ansible modules that can happen automatically without any requirement of advanced level programming language. <\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">The tool is completely agentless. That means the nodes or servers Ansible manages, don\u2019t require any software. This dramatically eliminates possible security issues and makes the IT configuration management more secure and smoother. But how Ansible works? Let\u2019s know more about Ansible and <a href=\"https:\/\/www.whizlabs.com\/blog\/ansible-best-practices\/\" target=\"_blank\" rel=\"noopener\">Ansible best practices<\/a>. <\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">The tool works by connecting to the nodes and transmitting small programs which are called Ansible modules. Most of the Ansible modules can be executed remotely. This makes the tool a push architecture. Here different configurations are pushed from Ansible to different servers without the help of any agents. This is quite different from the pull model. Speaking about this, it is an agent-based configuration management system where the IT configurations are pulled.<\/span><\/p>\n<p><a href=\"https:\/\/www.whizlabs.com\/learn-kubernetes-with-aws-and-docker\/\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-72355 size-full\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/08\/Kubernetes_with_AWS_and_Docker.gif\" alt=\"Kubernetes Training Course\" width=\"728\" height=\"90\" \/><\/a><\/p>\n<h2 class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">What are the Ansible Modules?<\/span><\/h2>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Ansible modules are the standalone scripts which use inside the ansible-playbook. The playbook includes a play, and a play includes different tasks. If you are reading about Ansible for the first time, then you may find it very confusing. But by working and writing more with the Ansible playbooks, you can make yourself familiar with all these things. <\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">The modules are mapped to resources and their states presented in YAML files. It is essential to know about must know ansible modules. They let the developers manage everything virtually. These are firewalls, load balancers, containers themselves, container orchestrators, AWS, Azure, OpenStack, private cloud, and security configuration. <\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">There are some top ansible modules that are frequently used to automate different tasks. In this article, we will cover those top and must know ansible modules. However, before going into that, there are three important files you must consider. These are: <\/span><\/p>\n<ul class=\"ul1\" style=\"text-align: justify;\">\n<li class=\"li1\"><span class=\"s1\"><b>Inventory\/ host file:<\/b> This file contains all the entry of nodes which will manage.<\/span><\/li>\n<li class=\"li1\"><span class=\"s1\"><b>Main file:<\/b> The playbook which has some crucial modules that can carry out different tasks on a host. <\/span><\/li>\n<li class=\"li1\"><span class=\"s1\"><b>Ansible.cfg file:<\/b> It is located at \/etc\/ansible\/ansible.cfg. The file carries important privilege escalation options and also the inventory file\u2019s location.<\/span><\/li>\n<\/ul>\n<p><strong>Also Check:<\/strong> <a href=\"https:\/\/www.whizlabs.com\/blog\/chef-vs-puppet-vs-ansible\/\" target=\"_blank\" rel=\"noopener\">Chef vs Puppet<\/a><\/p>\n<h3 class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">When Should You Develop an Ansible Module?<\/span><\/h3>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Even though Ansible comes with different modules, there are some chances that your issues are not yet covered. For example, a solution that makes sense in your company. Fortunately, ansible-galaxy offers some important guidelines about developing and installing modules and roles. Remember that, before you start developing something new; always check the ansible-galaxy website to see if a module or role exists.<\/span><\/p>\n<h4 class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Signs When You Need a New Module <\/span><\/h4>\n<ul class=\"ul1\" style=\"text-align: justify;\">\n<li class=\"li1\"><span class=\"s1\">Traditional configuration management methods, such as template module, file, etc. do not resolve your issues. <\/span><\/li>\n<li class=\"li1\"><span class=\"s1\">When you need to use some complex sets of commands or API calls through curl to complete your task. <\/span><\/li>\n<li class=\"li1\"><span class=\"s1\">The playbook is quite complicated and non-deterministic.<\/span><\/li>\n<\/ul>\n<blockquote><p>Certification helps the professionals to validate their skills and get global recognition for them. Check out the list of\u00a0<a href=\"https:\/\/www.whizlabs.com\/blog\/best-devops-certifications\/\" target=\"_blank\" rel=\"noopener noreferrer follow\" data-wpel-link=\"internal\">Top DevOps Certifications<\/a>\u00a0and be determined to get one!<\/p><\/blockquote>\n<h3 style=\"text-align: justify;\">Top AWS Modules You Need to Know<\/h3>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Not to mention, there are a number of Ansible modules that you have to use in your project for different functions. However, there are some top ansible modules which can help you in most of the project. These are easy-to-use Ansible modules and you should know them if you are working with Ansible. Let\u2019s have a look at those modules. <\/span><\/p>\n<h4 class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Module 1- Package Management <\/span><\/h4>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">There are some modules for package managers, for example, APT and DNF which let the users install different packages. Even though the functionality greatly depends on the package manager, these modules can upgrade, remove, install, and downgrade packages. The names for the modules are easy to understand. For example, the ansible yum module is yum_module, and the DNF module is dnf_module, etc. Some of the examples of this module are:<\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><strong><span class=\"s1\">To install the Apache Web Server and MariaDB SQL:<\/span><\/strong><\/p>\n<pre class=\"p1\"><span class=\"s1\">- name: install the latest version of Apache and MariaDB<\/span>\r\n\r\n<span class=\"s1\">dnf:<\/span>\r\n\r\n<span class=\"s1\"><span class=\"Apple-converted-space\">\u00a0 <\/span>name:<\/span>\r\n\r\n<span class=\"s1\"><span class=\"Apple-converted-space\">\u00a0 <\/span>- httpd<\/span>\r\n\r\n<span class=\"s1\"><span class=\"Apple-converted-space\">\u00a0 <\/span>- mariadb-server<\/span>\r\n\r\n<span class=\"s1\"><span class=\"Apple-converted-space\">\u00a0 <\/span>state: the latest<\/span><\/pre>\n<p class=\"p1\" style=\"text-align: justify;\"><strong><span class=\"s1\">To install and download packages:<\/span><\/strong><\/p>\n<pre class=\"p1\"><span class=\"s1\">- name: Install a list of packages<\/span>\r\n\r\n<span class=\"s1\"> yum:<\/span>\r\n\r\n<span class=\"s1\"> name:<\/span>\r\n\r\n<span class=\"s1\"> - nginx<\/span>\r\n\r\n<span class=\"s1\"> - PostgreSQL<\/span>\r\n\r\n<span class=\"s1\"> - PostgreSQL-server<\/span>\r\n\r\n<span class=\"s1\"> state: present<\/span><\/pre>\n<h4><a href=\"https:\/\/www.whizlabs.com\/aws-devops-certification-training\/\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-68009 size-full\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2018\/10\/DevOps-Engineer-Professional-Free-Test.jpg\" alt=\"DevOps Engineer Professional Free Test\" width=\"728\" height=\"90\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2018\/10\/DevOps-Engineer-Professional-Free-Test.jpg 728w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2018\/10\/DevOps-Engineer-Professional-Free-Test-300x37.jpg 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2018\/10\/DevOps-Engineer-Professional-Free-Test-640x79.jpg 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2018\/10\/DevOps-Engineer-Professional-Free-Test-681x84.jpg 681w\" sizes=\"(max-width: 728px) 100vw, 728px\" \/><\/a><\/h4>\n<h4 class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Module 2- Ansible Yum Module <\/span><\/h4>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">This module is generally used to install different services. The syntax for this module is <\/span><\/p>\n<pre class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">ansible test-servers -m yum -a 'name=httpd state=present' -become -u ec2-user<\/span><\/pre>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">This will install Apache 2 in the machines. <\/span><span class=\"s1\">The most important thing that you need to know that you need to use -become, the new in 2.6 version. Before, it was -s in the older version. <\/span><\/p>\n<h4 class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Module 3- Ansible Command Module<\/span><\/h4>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">The developers or experts use the Ansible command module to carry out commands on the remote node. They widely use this module to execute simple Linux commands on the remote servers. It is part of the standalone or host group server. If you want to perform some shell commands on a remote node, then you can use the command module. <\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">However, if there are some complex shell commands or multiple commands combined with PIPE, this command module will not work. In such a condition, you need to use the shell module. Besides PIPE, if y you choose a character like |&gt;&lt; in the command, then you must use the shell module. <\/span><\/p>\n<pre class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">ls -lrt \/etc\/httpd\/conf <\/span><\/pre>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">It is OK and is perfect for the command module.<\/span><\/p>\n<p><strong>Check Now:<\/strong> <a href=\"https:\/\/www.whizlabs.com\/blog\/red-hat-certified-specialist-in-ansible-automation-exam-preparation\/\" target=\"_blank\" rel=\"noopener\">Ansible certification<\/a><\/p>\n<h4 class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Module 4- Ansible User Module<\/span><\/h4>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">The ansible user module helps in managing different user\u2019s accounts in the Linux-based system. Besides, using this, you can create, sett passwords, add groups, and delete the user\u2019s account. For example, let\u2019s see how to create a user with this module. <\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Add the user &#8216;exampleuser&#8217; with a specific uid and a primary group of &#8216;admin.&#8217;<\/span><\/p>\n<pre class=\"p1\"><span class=\"s1\">- user:<\/span>\r\n\r\n<span class=\"s1\"> name: exampleuser<\/span>\r\n\r\n<span class=\"s1\"> comment: \"Example User.\"<\/span>\r\n\r\n<span class=\"s1\">UID: 1040<\/span>\r\n\r\n<span class=\"s1\"> group: admin<\/span><\/pre>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">There is only one important parameter, and that is the \u2018name\u2019 parameter. This is the user account name. However, if you don\u2019t give a password, the user account will display in a locked state. That means you will not be able to log in through the password option.<\/span><\/p>\n<blockquote><p>Also Read: <a href=\"https:\/\/www.whizlabs.com\/blog\/top-devops-tools\/\" target=\"_blank\" rel=\"noopener noreferrer\">List of Top DevOps Tools<\/a><\/p><\/blockquote>\n<h4 class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Module 5- Ansible Lineinfile Module <\/span><\/h4>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Talking about Ansible lineinfile module, this is generally used to alter or remove the existing line, insert line, and to replace the lines. Let\u2019s know about the process to insert a line. You can set the file\u2019s path to modify using the path\/ dest parameter. You can insert lines through the line parameter. The line enters to the EOF. However, if the line is already there in the system, it won\u2019t be added. <\/span><\/p>\n<pre class=\"p1\"><span class=\"s1\">- hosts: loc<\/span>\r\n\r\n<span class=\"s1\"> tasks:<\/span>\r\n\r\n<span class=\"s1\"> - name: Ansible insert lineinfile example<\/span>\r\n\r\n<span class=\"s1\">lineinfile:<\/span>\r\n\r\n<span class=\"s1\">dest: \/home\/mdtutorials2\/remote_server.txt<\/span>\r\n\r\n<span class=\"s1\">Line: Inserting a line in a file.<\/span>\r\n\r\n<span class=\"s1\">state: present<\/span>\r\n\r\n<span class=\"s1\">create: yes<\/span><\/pre>\n<h4 class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Module 6 \u2013 Ansible File Module<\/span><\/h4>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Creating different new files is a common task in the server scripts. In Ansible tools, you will find various methods for creating a new file. You can even set different group permission, assign an owner to the file; create a file with content, and more. It sets attributes of directories, symlinks, and files. Besides, it removes symlinks, directories, and file.<span class=\"Apple-converted-space\">\u00a0 <\/span>To create a new file in Ansible, first, you need to set two critical parameters. <\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">These are:<\/span><\/p>\n<ul class=\"ul1\" style=\"text-align: justify;\">\n<li class=\"li1\"><span class=\"s1\"><b>Path &#8211;<\/b> It refers to the location where the users want to create a new file. There are two types of paths, i.e., relative and absolute paths. You need to include the file name which you want to create. <\/span><\/li>\n<li class=\"li1\"><span class=\"s1\"><b>State &#8211;<\/b> While creating a new file, you need to set the state parameter to touch. It functions as the touch operation in Linux.<\/span><\/li>\n<\/ul>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Let&#8217;s see how to create a file with a name foo-conf and set the permission to 0644 using ansible file module.<\/span><\/p>\n<pre><span class=\"s1\">- name: Change file ownership, group, and permissions<\/span>\r\n\r\n<span class=\"s1\">file:<\/span>\r\n\r\n<span class=\"s1\"> path: \/etc\/foo.conf<\/span>\r\n\r\n<span class=\"s1\">owner: foo<\/span>\r\n\r\n<span class=\"s1\">group: foo<\/span>\r\n\r\n<span class=\"s1\">mode: '0644.'<\/span><\/pre>\n<h4><a href=\"https:\/\/www.whizlabs.com\/docker-certified-associate\/practice-tests\/\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-72446 size-full\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/08\/docker-leaderboard.jpg\" alt=\"Docker Practice Tests\" width=\"728\" height=\"90\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/08\/docker-leaderboard.jpg 728w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/08\/docker-leaderboard-300x37.jpg 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/08\/docker-leaderboard-640x79.jpg 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/08\/docker-leaderboard-681x84.jpg 681w\" sizes=\"(max-width: 728px) 100vw, 728px\" \/><\/a><\/h4>\n<h4 class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Module 7- Ansible Template Module<\/span><\/h4>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Creating static files to manage server configuration is not a perfect solution. If there is an efficient way, it would be beneficial. This is where you can use an Ansible template module. The templets contain all the configuration parameters. During the execution of the playbook, the variables replaced with the necessary values. You can carry out more than just replacing different variables using the Jinj2 templating engine. You can also go for loops, arithmetic calculations and more. <\/span><\/p>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Example- <\/span><\/p>\n<pre class=\"p1\"><span class=\"s1\">hosts: all<\/span>\r\n\r\n<span class=\"s1\">vars:<\/span>\r\n\r\n<span class=\"s1\">variable_to_be_replaced: 'Hello world'<\/span>\r\n\r\n<span class=\"s1\">inline_variable: 'hello again.'<\/span>\r\n\r\n<span class=\"s1\">tasks:<\/span>\r\n\r\n<span class=\"s1\">- name: Ansible Template Example<\/span>\r\n\r\n<span class=\"s1\">template:<\/span>\r\n\r\n<span class=\"s1\">Src: hello_world. j2<\/span>\r\n\r\n<span class=\"s1\">dest: \/Users\/mdtutorials2\/Documents\/Ansible\/hello_world.txt<\/span><\/pre>\n<h4 class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Module 8- Ansible Windows Modules<\/span><\/h4>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Ansible windows modules must be tested for windows hosts. To make Ansible manage the windows machines, you need to enable and configure the PowerShell. Keep in mind that you need a Linux Control Machine. You can\u2019t perform a task from a Windows host. Some of the Ansible Windows modules are &#8211;<\/span><\/p>\n<pre>win_acl - Set file\/directory\/registry<\/pre>\n<p>Sets permissions for a system user or group<\/p>\n<pre>win_audit_rule<\/pre>\n<p>Adds an audit rule to files, folders or registry keys<\/p>\n<pre>win_scheduled_task_stat<\/pre>\n<p>Get information about Windows Schedules Tasks<\/p>\n<h4 class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Module 9 \u2013 Ansible Archive Module <\/span><\/h4>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">This module creates the compressed archives of different files. The module assumes that the source of compression exists on the target. Let\u2019s have a look into an example. <\/span><\/p>\n<pre class=\"p1\"><span class=\"s1\">- name: Compress directory \/path\/to\/foo\/ into \/path\/to\/foo.tgz<\/span>\r\n\r\n<span class=\"s1\">archive:<\/span>\r\n\r\n<span class=\"s1\">path: \/path\/to\/foo<\/span>\r\n\r\n<span class=\"s1\">Dest: \/path\/to\/foo.tgz<\/span><\/pre>\n<h4 class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Module 10- Ansible Cli_Command Module <\/span><\/h4>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">The module which is available in Ansible version 2.7, offers a platform-agnostic method to push text-based configurations to devices through the network_cli connection plugin. For example, to sets the hostname and exit with a message, use the following command:<\/span><\/p>\n<pre><span class=\"s1\">- name: commit with comment<\/span>\r\n\r\n<span class=\"s1\">cli_config:<\/span>\r\n\r\n<span class=\"s1\">config: set system host-name foo<\/span>\r\n\r\n<span class=\"s1\">commit_comment: this is a test<\/span><\/pre>\n<blockquote><p>Preparing for an Ansible interview? Go through these\u00a0<a href=\"https:\/\/www.whizlabs.com\/blog\/ansible-interview-questions\/\" target=\"_blank\" rel=\"noopener noreferrer follow\" data-wpel-link=\"internal\">top Ansible interview questions<\/a>\u00a0and get ready to crack the Ansible interview.<\/p><\/blockquote>\n<h3 class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Conclusion <\/span><\/h3>\n<p class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">There is a lot of Ansible modules available in the latest version of Ansible with a number of commands. However, these ten common Ansible modules are the most powerful ones. You can use them to automate different projects. With the change in your requirements, you can learn more about other important modules from <a href=\"https:\/\/docs.ansible.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Ansible official documentation<\/a>. Learn more about them and be an Ansible expert.<\/span><\/p>\n<p style=\"text-align: justify;\">Ansible is one of the top DevOps tools among DevOps professionals. If you are a DevOps professional preparing for one of the top <a href=\"https:\/\/www.whizlabs.com\/aws-devops-certification-training\/\" target=\"_blank\" rel=\"noopener\">AWS D<span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;aws devops training&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:14337,&quot;3&quot;:{&quot;1&quot;:1},&quot;14&quot;:{&quot;1&quot;:3,&quot;3&quot;:1},&quot;15&quot;:&quot;Calibri&quot;,&quot;16&quot;:11}\">evOps training<\/span><\/a> or <a href=\"https:\/\/www.whizlabs.com\/aws-certifications\/\" target=\"_blank\" rel=\"noopener\">Azure DevOps certifications<\/a>, enroll for the <a href=\"https:\/\/www.whizlabs.com\/devops-certifications\/\" target=\"_blank\" rel=\"noopener noreferrer follow\" data-wpel-link=\"internal\">DevOps certification training courses<\/a> and give your preparation a new edge.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ansible is a popular and widely uses open source IT configuration automation and management tool. The platform employs human-readable and easily understandable YAML templets. This lets the users program continuous tasks with the Ansible modules that can happen automatically without any requirement of advanced level programming language. The tool is completely agentless. That means the nodes or servers Ansible manages, don\u2019t require any software. This dramatically eliminates possible security issues and makes the IT configuration management more secure and smoother. But how Ansible works? Let\u2019s know more about Ansible and Ansible best practices. The tool works by connecting to the [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":73174,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1862],"tags":[2479,2478,2477,2482,2484,2480,2483,2481,3998,2485,2486],"class_list":["post-73169","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","tag-ansible-command-module","tag-ansible-file-module","tag-ansible-galaxy","tag-ansible-lineinfile","tag-ansible-template-module","tag-ansible-user-module","tag-ansible-windows-modules","tag-ansible-yum-module","tag-aws-devops-training","tag-must-know-ansible-modules","tag-top-ansible-modules"],"uagb_featured_image_src":{"full":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/10\/ansible-modules.png",600,315,false],"thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/10\/ansible-modules-150x150.png",150,150,true],"medium":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/10\/ansible-modules-300x158.png",300,158,true],"medium_large":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/10\/ansible-modules.png",600,315,false],"large":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/10\/ansible-modules.png",600,315,false],"1536x1536":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/10\/ansible-modules.png",600,315,false],"2048x2048":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/10\/ansible-modules.png",600,315,false],"profile_24":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/10\/ansible-modules.png",24,13,false],"profile_48":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/10\/ansible-modules.png",48,25,false],"profile_96":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/10\/ansible-modules.png",96,50,false],"profile_150":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/10\/ansible-modules.png",150,79,false],"profile_300":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/10\/ansible-modules.png",300,158,false],"tptn_thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/10\/ansible-modules-250x250.png",250,250,true],"web-stories-poster-portrait":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/10\/ansible-modules.png",600,315,false],"web-stories-publisher-logo":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/10\/ansible-modules.png",96,50,false],"web-stories-thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/10\/ansible-modules.png",150,79,false]},"uagb_author_info":{"display_name":"Dharmalingam N","author_link":"https:\/\/www.whizlabs.com\/blog\/author\/dharmalingam\/"},"uagb_comment_info":6,"uagb_excerpt":"Ansible is a popular and widely uses open source IT configuration automation and management tool. The platform employs human-readable and easily understandable YAML templets. This lets the users program continuous tasks with the Ansible modules that can happen automatically without any requirement of advanced level programming language. The tool is completely agentless. That means the&hellip;","_links":{"self":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/73169","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/comments?post=73169"}],"version-history":[{"count":7,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/73169\/revisions"}],"predecessor-version":[{"id":77597,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/73169\/revisions\/77597"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/media\/73174"}],"wp:attachment":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/media?parent=73169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/categories?post=73169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/tags?post=73169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}