{"id":16846,"date":"2021-08-02T15:05:14","date_gmt":"2021-08-02T09:35:14","guid":{"rendered":"http:\/\/onlineappsdba.com\/?p=16846"},"modified":"2021-08-02T15:05:14","modified_gmt":"2021-08-02T09:35:14","slug":"roles","status":"publish","type":"post","link":"https:\/\/onlineappsdba.com\/index.php\/2021\/08\/02\/roles\/","title":{"rendered":"Ansible Roles: Steps to Create and Manage"},"content":{"rendered":"<p>Are you using \ud83c\udd70\ufe0f Ansible and don&#8217;t know much about Ansible Playbook and Ansible Roles \u2049\ufe0f Here is a brief introduction for you \u203c\ufe0f<\/p>\n<p>\u27a4 What is Ansible Playbook?<\/p>\n<p>You might be familiar with the Ansible playbook. These are a complete collection of tasks containing configuration and deployment instructions.<\/p>\n<p>\u27a4 What are Ansible Roles?<\/p>\n<p>Ansible Roles are much simpler than Ansible Playbooks. All the tasks of the Ansible playbook are divided into different modules called Ansible Roles. Roles provide a framework for independent and interdependent collections of variables, tasks, modules, and templates. Ansible Roles helps in modulation, and for a developer, it\u2019s much easier to manage these roles.<\/p>\n<p>\u27a4 How to create Ansible Roles?<\/p>\n<p>Ansible Roles are much similar to a playbook. The only difference between both is that Ansible Playbook runs a single YAML file, whereas Ansible Roles are multiple subparts of the Ansible Playbook YAML file. So the process is much similar, and if you have already worked on Ansible Playbook, it will be much easier for you to understand the steps. Check out the blog link below that will give a complete step-by-step tutorial to create Ansible Roles with a detailed explanation.<\/p>\n<p>\u27a4 This blog will cover the following topics in detail.<\/p>\n<p>\u2022 Overview of Ansible<\/p>\n<p>\u2022 What are Ansible Roles<\/p>\n<p>\u2022 Install and Configure Ansible<\/p>\n<p>\u2022 Create Ansible Roles<\/p>\n<p>\u2022 Execute Ansible Roles<\/p>\n<p>If you want to learn more about Ansible and create Ansible Roles by yourself, then check our <em><strong><a href=\"https:\/\/k21academy.com\/ansible\/roles\/?utm_source=onlineappsdba&amp;utm_medium=referral&amp;utm_campaign=ansible15_august21\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/k21academy.com\/ansible15<\/a> <\/strong><\/em><\/p>\n<p>Be the first to know when the doors to Ansible for Beginners training open. Register for the waitlist &gt;&gt; <a href=\"https:\/\/k21academy.com\/ansible-waitlist\/?utm_source=onlineappsdba&amp;utm_medium=referral&amp;utm_campaign=ansible_waitlist_july21\" target=\"_blank\" rel=\"noopener noreferrer\"><em><strong>https:\/\/k21academy.com\/ansible-waitlist\/<\/strong><\/em><\/a><\/p>\n<p><a href=\"https:\/\/k21academy.com\/ansible-waitlist\/?utm_source=onlineappsdba&amp;utm_medium=referral&amp;utm_campaign=ansible_waitlist_july21\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"transparent aligncenter\" src=\"https:\/\/k21academy.com\/wp-content\/uploads\/2021\/07\/Ansible_CU.gif\" alt=\"https:\/\/k21academy.com\/wp-content\/uploads\/2021\/07\/Ansible_CU.gif\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Are you using \ud83c\udd70\ufe0f Ansible and don&#8217;t know much about Ansible Playbook and Ansible Roles \u2049\ufe0f Here is a brief [&hellip;]<\/p>\n","protected":false},"author":115,"featured_media":16847,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"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-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":"","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-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":"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":""},"mobile":{"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":""}},"footnotes":""},"categories":[571],"tags":[],"class_list":["post-16846","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ansible"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Ansible Roles: Introduction and Steps to Create &amp; Manage Roles<\/title>\n<meta name=\"description\" content=\"Ansible Playbook is divided into different modules called Ansible Roles. This blog will show you a tutorial with explaination for creating Ansible Roles.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/onlineappsdba.com\/index.php\/2021\/08\/02\/roles\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ansible Roles: Introduction and Steps to Create &amp; Manage Roles\" \/>\n<meta property=\"og:description\" content=\"Ansible Playbook is divided into different modules called Ansible Roles. This blog will show you a tutorial with explaination for creating Ansible Roles.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/onlineappsdba.com\/index.php\/2021\/08\/02\/roles\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-02T09:35:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/onlineappsdba.com\/wp-content\/uploads\/2021\/08\/Ansible-Roles-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Masroof Ahmad\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Masroof Ahmad\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/onlineappsdba.com\/index.php\/2021\/08\/02\/roles\/\",\"url\":\"https:\/\/onlineappsdba.com\/index.php\/2021\/08\/02\/roles\/\",\"name\":\"Ansible Roles: Introduction and Steps to Create & Manage Roles\",\"isPartOf\":{\"@id\":\"https:\/\/onlineappsdba.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/onlineappsdba.com\/index.php\/2021\/08\/02\/roles\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/onlineappsdba.com\/index.php\/2021\/08\/02\/roles\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/onlineappsdba.com\/wp-content\/uploads\/2021\/08\/Ansible-Roles-2.png\",\"datePublished\":\"2021-08-02T09:35:14+00:00\",\"author\":{\"@id\":\"https:\/\/onlineappsdba.com\/#\/schema\/person\/909a876ed58d400faf82caf81d61bfdb\"},\"description\":\"Ansible Playbook is divided into different modules called Ansible Roles. This blog will show you a tutorial with explaination for creating Ansible Roles.\",\"breadcrumb\":{\"@id\":\"https:\/\/onlineappsdba.com\/index.php\/2021\/08\/02\/roles\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/onlineappsdba.com\/index.php\/2021\/08\/02\/roles\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/onlineappsdba.com\/index.php\/2021\/08\/02\/roles\/#primaryimage\",\"url\":\"https:\/\/onlineappsdba.com\/wp-content\/uploads\/2021\/08\/Ansible-Roles-2.png\",\"contentUrl\":\"https:\/\/onlineappsdba.com\/wp-content\/uploads\/2021\/08\/Ansible-Roles-2.png\",\"width\":1920,\"height\":1080,\"caption\":\"Ansible\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/onlineappsdba.com\/index.php\/2021\/08\/02\/roles\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/onlineappsdba.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ansible Roles: Steps to Create and Manage\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/onlineappsdba.com\/#website\",\"url\":\"https:\/\/onlineappsdba.com\/\",\"name\":\"\",\"description\":\"Oracle Implementation &amp; Training Experts\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/onlineappsdba.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/onlineappsdba.com\/#\/schema\/person\/909a876ed58d400faf82caf81d61bfdb\",\"name\":\"Masroof Ahmad\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/onlineappsdba.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/10f9db7bdbbd7f9ccfbe9b2d208e5978fc28315e9c704383e639a926ea0fce5f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/10f9db7bdbbd7f9ccfbe9b2d208e5978fc28315e9c704383e639a926ea0fce5f?s=96&d=mm&r=g\",\"caption\":\"Masroof Ahmad\"},\"url\":\"https:\/\/onlineappsdba.com\/index.php\/author\/masroof\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Ansible Roles: Introduction and Steps to Create & Manage Roles","description":"Ansible Playbook is divided into different modules called Ansible Roles. This blog will show you a tutorial with explaination for creating Ansible Roles.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/onlineappsdba.com\/index.php\/2021\/08\/02\/roles\/","og_locale":"en_US","og_type":"article","og_title":"Ansible Roles: Introduction and Steps to Create & Manage Roles","og_description":"Ansible Playbook is divided into different modules called Ansible Roles. This blog will show you a tutorial with explaination for creating Ansible Roles.","og_url":"https:\/\/onlineappsdba.com\/index.php\/2021\/08\/02\/roles\/","article_published_time":"2021-08-02T09:35:14+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/onlineappsdba.com\/wp-content\/uploads\/2021\/08\/Ansible-Roles-2.png","type":"image\/png"}],"author":"Masroof Ahmad","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Masroof Ahmad","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/onlineappsdba.com\/index.php\/2021\/08\/02\/roles\/","url":"https:\/\/onlineappsdba.com\/index.php\/2021\/08\/02\/roles\/","name":"Ansible Roles: Introduction and Steps to Create & Manage Roles","isPartOf":{"@id":"https:\/\/onlineappsdba.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/onlineappsdba.com\/index.php\/2021\/08\/02\/roles\/#primaryimage"},"image":{"@id":"https:\/\/onlineappsdba.com\/index.php\/2021\/08\/02\/roles\/#primaryimage"},"thumbnailUrl":"https:\/\/onlineappsdba.com\/wp-content\/uploads\/2021\/08\/Ansible-Roles-2.png","datePublished":"2021-08-02T09:35:14+00:00","author":{"@id":"https:\/\/onlineappsdba.com\/#\/schema\/person\/909a876ed58d400faf82caf81d61bfdb"},"description":"Ansible Playbook is divided into different modules called Ansible Roles. This blog will show you a tutorial with explaination for creating Ansible Roles.","breadcrumb":{"@id":"https:\/\/onlineappsdba.com\/index.php\/2021\/08\/02\/roles\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/onlineappsdba.com\/index.php\/2021\/08\/02\/roles\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/onlineappsdba.com\/index.php\/2021\/08\/02\/roles\/#primaryimage","url":"https:\/\/onlineappsdba.com\/wp-content\/uploads\/2021\/08\/Ansible-Roles-2.png","contentUrl":"https:\/\/onlineappsdba.com\/wp-content\/uploads\/2021\/08\/Ansible-Roles-2.png","width":1920,"height":1080,"caption":"Ansible"},{"@type":"BreadcrumbList","@id":"https:\/\/onlineappsdba.com\/index.php\/2021\/08\/02\/roles\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/onlineappsdba.com\/"},{"@type":"ListItem","position":2,"name":"Ansible Roles: Steps to Create and Manage"}]},{"@type":"WebSite","@id":"https:\/\/onlineappsdba.com\/#website","url":"https:\/\/onlineappsdba.com\/","name":"","description":"Oracle Implementation &amp; Training Experts","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/onlineappsdba.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/onlineappsdba.com\/#\/schema\/person\/909a876ed58d400faf82caf81d61bfdb","name":"Masroof Ahmad","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/onlineappsdba.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/10f9db7bdbbd7f9ccfbe9b2d208e5978fc28315e9c704383e639a926ea0fce5f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/10f9db7bdbbd7f9ccfbe9b2d208e5978fc28315e9c704383e639a926ea0fce5f?s=96&d=mm&r=g","caption":"Masroof Ahmad"},"url":"https:\/\/onlineappsdba.com\/index.php\/author\/masroof\/"}]}},"_links":{"self":[{"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/posts\/16846","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/users\/115"}],"replies":[{"embeddable":true,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/comments?post=16846"}],"version-history":[{"count":0,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/posts\/16846\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/media\/16847"}],"wp:attachment":[{"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/media?parent=16846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/categories?post=16846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/tags?post=16846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}