Posts

Showing posts with the label include_role

Ansible Reusability with roles and ansible galaxy

Image
Ansible Roles In this post, I've gone thru multiple articles and YouTube videos on 'ansible roles', which helped me to understand into a deeper level of Ansible roles and galaxy site and CLI commands with various options. So, sharing here with you   What is role in Ansible? The role is the primary mechanism for breaking a playbook into multiple files. This simplifies writing complex playbooks, and it makes them easier to reuse.  Why should I use Roles in Ansible? The following are the reasons to work with roles Address complexity Reusability and sharing Modular code Learn how to build and create ansible roles to manage remote machines using an ansible configuration management tool.  For example let's create an apache role to install, configure and easy to manage the Apache web server using the roles.  Ansible Galaxy ansible roles structure Defining Ansible Roles are having major role in simplifying a larger playbook split into multiple small files called roles ...