Simplifying Ansible Playbooks with Roles
November 14, 2022 Vineet Negi | Comments(0)Ansible Roles make it easier to reuse Ansible code. You can package in a directory structure containing all the tasks, variables, files, templates, and other resources needed to configure software, applications, etc. Copy that role from project to project simply by copying the directory. You can then simply call that role from a play to execute it. Roles are a supplemental playbook feature that can be utilised on its own. Under no circumstances can the role be performed directly. Top-level playbooks serve as a link between the hosts in the user’s inventory file and the responsibilities that should be applicable to them.
Continue Reading…