{"id":74464,"date":"2020-02-27T06:10:20","date_gmt":"2020-02-27T06:10:20","guid":{"rendered":"https:\/\/www.whizlabs.com\/blog\/?p=74464"},"modified":"2021-01-29T11:05:17","modified_gmt":"2021-01-29T11:05:17","slug":"ansible-best-practices","status":"publish","type":"post","link":"https:\/\/www.whizlabs.com\/blog\/ansible-best-practices\/","title":{"rendered":"Top 10 Ansible Best Practices"},"content":{"rendered":"<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\"><a href=\"https:\/\/www.whizlabs.com\/blog\/ansible-introduction\/\" target=\"_blank\" rel=\"noopener noreferrer\">Ansible<\/a>, an open-source automation platform, has been a prominent introduction in the <a href=\"https:\/\/www.whizlabs.com\/blog\/devops-introduction\/\" target=\"_blank\" rel=\"noopener noreferrer\">DevOps<\/a> movement. The applications of Ansible in the automation of application deployment, configuration management, cloud provision, and intra-service orchestration lead to a rising interest in\u00a0<\/span><span class=\"s2\">Ansible best practices<\/span><span class=\"s1\">. Ansible is ideal for multi-tier deployments, thereby aligning with the cloud\u2019s basic structure precisely, which is increasing the demand for an <a href=\"https:\/\/www.whizlabs.com\/blog\/red-hat-certified-specialist-in-ansible-automation-exam-preparation\/\" target=\"_blank\" rel=\"noopener\">Ansible certification<\/a>. <\/span><\/p>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">Ansible helps in modeling the cloud IT infrastructure with a description of inter-relation between all systems. Ansible does not implement any agents or additional custom security infrastructure. Furthermore, Ansible also offers flexibility for deployment and uses the simple YAML language in its Playbooks. Therefore, the user could easily describe automation jobs in simple English.\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/www.whizlabs.com\/ansible-basics\/\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-73314 size-full td-animation-stack-type0-2\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/10\/ansible_basics_video_course.png\" sizes=\"(max-width: 728px) 100vw, 728px\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/10\/ansible_basics_video_course.png 728w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/10\/ansible_basics_video_course-300x37.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/10\/ansible_basics_video_course-640x79.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/10\/ansible_basics_video_course-681x84.png 681w\" alt=\"Ansible Basics Video Course\" width=\"728\" height=\"90\" \/><\/a><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 ez-toc-wrap-left 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\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #ea7e02;color:#ea7e02\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #ea7e02;color:#ea7e02\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/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:\/\/www.whizlabs.com\/blog\/ansible-best-practices\/#Ansible_Best_Practices_You_Should_Learn\" >Ansible Best Practices You Should Learn<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.whizlabs.com\/blog\/ansible-best-practices\/#1_Understand_the_Philosophy_in_Ansibles_Design\" >1. Understand the Philosophy in Ansible\u2019s Design<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.whizlabs.com\/blog\/ansible-best-practices\/#2_Use_the_%E2%80%9Cname%E2%80%9D_for_Tasks_and_Plays\" >2. Use the \u201cname\u201d for Tasks and Plays<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.whizlabs.com\/blog\/ansible-best-practices\/#3_Maintain_Explicitness_while_Writing_Tasks\" >3. Maintain Explicitness while Writing Tasks<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.whizlabs.com\/blog\/ansible-best-practices\/#4_Re-Use_what_is_Already_Present\" >4. Re-Use what is Already Present<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.whizlabs.com\/blog\/ansible-best-practices\/#5_Best_Practice_for_Documentation_of_Roles\" >5. Best Practice for Documentation of Roles<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.whizlabs.com\/blog\/ansible-best-practices\/#6_Finding_the_Right_Application_for_Roles_and_Modules\" >6. Finding the Right Application for Roles and Modules<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.whizlabs.com\/blog\/ansible-best-practices\/#7_How_to_Improve_the_Usability_of_Roles\" >7. How to Improve the Usability of Roles?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.whizlabs.com\/blog\/ansible-best-practices\/#8_Dont_Expose_Sensitive_Data_in_Ansible_Output\" >8. Don\u2019t Expose Sensitive Data in Ansible Output<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.whizlabs.com\/blog\/ansible-best-practices\/#9_Verification_of_Compliance\" >9. Verification of Compliance<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.whizlabs.com\/blog\/ansible-best-practices\/#10_Best_Practices_for_Module_Documentation\" >10. Best Practices for Module Documentation<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Ansible_Best_Practices_You_Should_Learn\"><\/span>Ansible Best Practices You Should Learn<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">The only proven approach to use Ansible to its full potential is by referring to the best practices recommended by experts. The following discussion presents a collection of the ten most important\u00a0<\/span><span class=\"s2\">ansible best practices you should know<\/span><span class=\"s1\">. As noted above, Ansible does not have a custom security infrastructure. Therefore, the following list of best practices would also include references to ideal measures for security on Ansible.\u00a0<\/span><\/p>\n<h3 class=\"p1\" style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"1_Understand_the_Philosophy_in_Ansibles_Design\"><\/span><span class=\"s1\">1. Understand the Philosophy in Ansible\u2019s Design<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">The foremost best practice for using Ansible is to understand the philosophy underlying the design of Ansible. You can notice that almost all\u00a0<\/span><span class=\"s2\">Ansible best practices<\/span><span class=\"s1\">\u00a0have some sort of relation to the philosophy behind Ansible. First of all, Ansible reduces complexity through the design of tools, and it also encourages users to do the same. <\/span><\/p>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">The next crucial philosophy of Ansible\u2019s design is the optimization of Ansible content for readability. If the Ansible content is properly optimized, then it could also serve as the documentation for workflow automation. Ansible plays, and\u00a0<\/span><span class=\"s2\">Ansible roles<\/span><span class=\"s1\">\u00a0are not ideal for writing code. They encourage users to focus on the design of the automation process.<\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2019\/09\/ansible_architecture.png\" alt=\"Ansible Architecture\" \/><\/p>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">The most important recommendation in the philosophy of Ansible is the suitability of diverse approaches. Ansible has substantial capabilities for adapting to diverse environments and workflows alongside ensuring the management of complex automation tasks. Therefore, users should continue experimenting with different approaches to leverage the maximum potential of Ansible\u2019s power and simplicity.\u00a0<\/span><\/p>\n<h3 class=\"p1\" style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"2_Use_the_%E2%80%9Cname%E2%80%9D_for_Tasks_and_Plays\"><\/span><span class=\"s1\">2. Use the \u201cname\u201d for Tasks and Plays<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s2\">Ansible playbooks<\/span><span class=\"s1\">\u00a0are one of the significant components, or you can say, the foundation of Ansible. The Ansible plays and tasks in the Playbook should have the \u201cName\u201d attribute. Users should always follow this essential entry among\u00a0<\/span><span class=\"s2\">Ansible best practices<\/span><span class=\"s1\">. The addition of a name with a helpful description that humans can understand is ideal for communicating the intent of plays or tasks. Users could know the objective of the play while running it. You can consider the example of a play and the standard Ansible output in the image below.<\/span><\/p>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">A user could see the function of the play without knowing the contents of the play. However, the user would only know that the play is conducting some process with yum or the service. Therefore, there is no clarity regarding the objective of the play. The objective could either be the filename or some other additional documentation source. Now, let us add \u201cname\u201d declaration on the play as well as all the involved tasks like in the example as follows,<\/span><\/p>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">Now, the advantage of\u00a0<\/span><span class=\"s2\">Ansible best practices<\/span><span class=\"s1\">\u00a0is quite clear here! By adding the \u201cname\u201d attribute, users could find out about the activity of the playbook. Users could find out what the playbook is doing in the output of the playbook run. Furthermore, this practice also supports the use of \u201c&#8211;list-tasks\u201d switch in the \u201cansible-playbook.\u201d\u00a0<\/span><\/p>\n<h3 class=\"p1\" style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"3_Maintain_Explicitness_while_Writing_Tasks\"><\/span><span class=\"s1\">3. Maintain Explicitness while Writing Tasks<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">The next entry in\u00a0<\/span><span class=\"s2\">Ansible best practices<\/span><span class=\"s1\">\u00a0implies that while writing tasks, users have to be explicit. You can take the following example to understand exactly what it is to be explicit while writing Ansible tasks.\u00a0<\/span><\/p>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">Instead of the above, you can write the task like the example below,<\/span><\/p>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">There are two prominent reasons to follow this best practice. Without an explicit declaration of the owner and group of the file, the owner is generally the user executing Ansible. Therefore, it is not desirable on the basis of security reasons. The second reason implies that when people use\u00a0<\/span><span class=\"s2\">Ansible playbooks<\/span><span class=\"s1\">\u00a0or\u00a0<\/span><span class=\"s2\">Ansible roles<\/span><span class=\"s1\">, they could not always know about the defaults of modules used. People could not know about the exact objective of the tasks. On the other hand, maintaining explicitness in the tasks provides a better sense of direction to a project.<\/span><\/p>\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=\"ez-toc-section\" id=\"4_Re-Use_what_is_Already_Present\"><\/span><span class=\"s1\">4. Re-Use what is Already Present<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">One of the best ways to get the best of Ansible is to look for re-using existing roles.\u00a0<\/span><span class=\"s2\">Ansible best practices<\/span><span class=\"s1\">\u00a0indicate that you should look for playbooks and roles before writing them. Maybe someone has already done that! So, why go through all the effort? Generally, Ansible Galaxy always has a role for common software. Many individuals and organizations provide various high-quality roles such as ANXS, jdauphant, and others. Users should use \u201cansible-galaxy init\u201d for creating the initial directory layout while creating their role and adhere to it.\u00a0<\/span><\/p>\n<h3 class=\"p1\" style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"5_Best_Practice_for_Documentation_of_Roles\"><\/span><span class=\"s1\">5. Best Practice for Documentation of Roles<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">Documentation of roles is also one of the important aspects of improving the user experience with Ansible. Therefore, one of the\u00a0<\/span><span class=\"s2\">Ansible best practices you should know<\/span><span class=\"s1\"> while documenting roles is the use of a template created through \u201cansible-galaxy init.\u201d Users should use the template for describing the role and the function and explaining the variables used. In addition, users should also describe the required dependencies alongside examples.\u00a0<\/span><\/p>\n<h3 class=\"p1\" style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"6_Finding_the_Right_Application_for_Roles_and_Modules\"><\/span><span class=\"s1\">6. Finding the Right Application for Roles and Modules<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">Users should also follow the best practice of using the right tool for the right job. There are specific approaches for dealing with roles and modules in Ansible. Let us find out the particular concerns regarding productivity in the case of roles and then in the case of modules. Roles are self-contained units of Ansible automation that express in YAML language and relate with other assets in the bundle. <\/span><\/p>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">The decoupling of roles follows the assumptions that play make. Roles allow for reuse and collaboration of general automation workflows and configurations. The roles also provide complete lifecycle management for service, container, or microservice. Roles also imply the enforcement of standards and policies by default. <\/span><\/p>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">Modules are small programs performing actions on remote hosts or on their behalf. Users can express modules as Python or PowerShell code, and an Ansible task can call modules. Modules are ideal for complex interactions and logic of a unit of work generally with APIs or a command line. Modules also help in the abstraction of complexity for simpler automation.\u00a0<\/span><\/p>\n<blockquote><p>Thinking to adopt Ansible as a configuration management tool? Let\u2019s understand the <a href=\"https:\/\/www.whizlabs.com\/blog\/ansible-advantages-and-disadvantages\/\" target=\"_blank\" rel=\"noopener noreferrer\">advantages and disadvantages of Ansible<\/a>.<\/p><\/blockquote>\n<h3 class=\"p1\" style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"7_How_to_Improve_the_Usability_of_Roles\"><\/span><span class=\"s1\">7. How to Improve the Usability of Roles?<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">The next addition to this list of\u00a0<\/span><span class=\"s2\">Ansible best practices<\/span><span class=\"s1\">\u00a0refers to improving role usability. Users should run roles with limited parameter variables and emphasize convention over configuration. In addition, users should also provide sane defaults. Other crucial recommendations to enhance role usability include using variable parameters for modification of default behavior. Furthermore, users should always maintain a role such that it is easy to develop, test, and use with better speed and security.<\/span><\/p>\n<h3 class=\"p1\" style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"8_Dont_Expose_Sensitive_Data_in_Ansible_Output\"><\/span><span class=\"s1\">8. Don\u2019t Expose Sensitive Data in Ansible Output<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">The focus on\u00a0<\/span><span class=\"s2\">Ansible security best practices<\/span><span class=\"s1\">\u00a0is also an important concern for Ansible users. Users should not expose sensitive data in the Ansible output. If you are using the \u201ctemplate-\u201d module and the file has passwords and other sensitive data, then you would not want them in the Ansible output. In such cases, you can use the \u201cno_log\u201d option. By adding the \u201cno_log-\u201d option to a task, there will be no logs of the output. For example, consider the following playbook,\u00a0<\/span><\/p>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">Without the \u201cno_log: true,\u201d you can find the following output,<\/span><\/p>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">With the \u201cno_log: true\u201d enabled, you can find the following output,<\/span><\/p>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">You can also use \u201cansible-vault\u201d for the safety of sensitive data in playbooks and roles.\u00a0<\/span><\/p>\n<h3 class=\"p1\" style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"9_Verification_of_Compliance\"><\/span><span class=\"s1\">9. Verification of Compliance<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">Another mention in\u00a0<\/span><span class=\"s2\">Ansible security best practices<\/span><span class=\"s1\">\u00a0refers to verification of compliance. Users should always verify the security configuration on Ansible frequently. Ansible would repeatedly apply the same security configuration with only necessary changes for reverting the system to compliance. <\/span><\/p>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">A review of these processes could help in the identification of areas for changes. Ansible\u2019s task-based nature helps in easier content writing with tools such as STIGMA and OpenSCAP for verifying automation. Users could improve the safeguards of their Ansible configurations by integrating Ansible Tower\u2019s data collection with general logging and analytics providers.<\/span><\/p>\n<h3 class=\"p1\" style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"10_Best_Practices_for_Module_Documentation\"><\/span><span class=\"s1\">10. Best Practices for Module Documentation<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">The documentation of modules is also a crucial aspect of\u00a0<\/span><span class=\"s2\">Ansible best practices<\/span><span class=\"s1\">. The module documentation is mandatory and should follow recommendations to ensure simplicity. The examples should have common and general practical uses. In addition, the examples in the module documentation should follow the YAML syntax. The return responses should be in the module documentation with a comprehensive description. Furthermore, users should also document the dependencies in the requirements part of Ansible.\u00a0<\/span><\/p>\n<blockquote><p>Here&#8217;re some How-to&#8217;s to <a href=\"https:\/\/www.whizlabs.com\/blog\/maximize-your-ansible-skills\/\" target=\"_blank\" rel=\"noopener noreferrer\">MAXIMIZE YOUR ANSIBLE SKILLS<\/a><\/p><\/blockquote>\n<h4 class=\"p1\" style=\"text-align: justify;\"><span class=\"s1\">Final Words<\/span><\/h4>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">Ansible is an open-source tool and is a powerful automation instrument. Therefore, you can find diverse illustrations of <\/span><span class=\"s2\">Ansible best practices<\/span><span class=\"s1\"> from multiple sources. Users should obtain basic awareness regarding the structure of the Ansible and simple functionalities of Ansible. To extend your Ansible skills, you can also understand its comparison with other tools like <a href=\"https:\/\/www.whizlabs.com\/blog\/chef-vs-puppet-vs-ansible\/\" target=\"_blank\" rel=\"noopener\">Chef vs Puppet<\/a>, <a href=\"https:\/\/www.whizlabs.com\/blog\/ansible-vs-terraform\/\" target=\"_blank\" rel=\"noopener\">Terraform vs Ansible<\/a>, <a href=\"https:\/\/www.whizlabs.com\/blog\/chef-vs-puppet-vs-ansible\/\" target=\"_blank\" rel=\"noopener\">Chef vs Puppet vs Ansible<\/a>, etc. You can enroll in the <a href=\"https:\/\/www.whizlabs.com\/ansible-basics\/\" target=\"_blank\" rel=\"noopener noreferrer\">Ansible Basics training course<\/a> to explore additional information about Ansible. <\/span><\/p>\n<p class=\"p2\" style=\"text-align: justify;\"><span class=\"s1\">Furthermore, hands-on labs and practical experience in automating configurations on Ansible can help you learn the best practices effectively. The applications of Ansible in DevOps and the best ways to obtain the most out of Ansible are numerous. All you have to do is to learn how to be better at Ansible!<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ansible, an open-source automation platform, has been a prominent introduction in the DevOps movement. The applications of Ansible in the automation of application deployment, configuration management, cloud provision, and intra-service orchestration lead to a rising interest in\u00a0Ansible best practices. Ansible is ideal for multi-tier deployments, thereby aligning with the cloud\u2019s basic structure precisely, which is increasing the demand for an Ansible certification. Ansible helps in modeling the cloud IT infrastructure with a description of inter-relation between all systems. Ansible does not implement any agents or additional custom security infrastructure. Furthermore, Ansible also offers flexibility for deployment and uses the simple [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":74564,"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":[3074,3072,3071,3073],"class_list":["post-74464","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","tag-ansible-best-practices-you-should-know","tag-ansible-playbooks","tag-ansible-roles","tag-ansible-security-best-practices"],"uagb_featured_image_src":{"full":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/01\/Ansible_Best_Practices.png",600,315,false],"thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/01\/Ansible_Best_Practices-150x150.png",150,150,true],"medium":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/01\/Ansible_Best_Practices-300x158.png",300,158,true],"medium_large":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/01\/Ansible_Best_Practices.png",600,315,false],"large":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/01\/Ansible_Best_Practices.png",600,315,false],"1536x1536":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/01\/Ansible_Best_Practices.png",600,315,false],"2048x2048":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/01\/Ansible_Best_Practices.png",600,315,false],"profile_24":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/01\/Ansible_Best_Practices.png",24,13,false],"profile_48":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/01\/Ansible_Best_Practices.png",48,25,false],"profile_96":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/01\/Ansible_Best_Practices.png",96,50,false],"profile_150":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/01\/Ansible_Best_Practices.png",150,79,false],"profile_300":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/01\/Ansible_Best_Practices.png",300,158,false],"tptn_thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/01\/Ansible_Best_Practices-250x250.png",250,250,true],"web-stories-poster-portrait":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/01\/Ansible_Best_Practices.png",600,315,false],"web-stories-publisher-logo":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/01\/Ansible_Best_Practices.png",96,50,false],"web-stories-thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2020\/01\/Ansible_Best_Practices.png",150,79,false]},"uagb_author_info":{"display_name":"Dharmalingam N","author_link":"https:\/\/www.whizlabs.com\/blog\/author\/dharmalingam\/"},"uagb_comment_info":2,"uagb_excerpt":"Ansible, an open-source automation platform, has been a prominent introduction in the DevOps movement. The applications of Ansible in the automation of application deployment, configuration management, cloud provision, and intra-service orchestration lead to a rising interest in\u00a0Ansible best practices. Ansible is ideal for multi-tier deployments, thereby aligning with the cloud\u2019s basic structure precisely, which is&hellip;","_links":{"self":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/74464","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=74464"}],"version-history":[{"count":11,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/74464\/revisions"}],"predecessor-version":[{"id":77483,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/74464\/revisions\/77483"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/media\/74564"}],"wp:attachment":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/media?parent=74464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/categories?post=74464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/tags?post=74464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}