Ansible roles are a structured way of grouping tasks, variables, files, and handlers that are stored in a standardized file structure.
Among the roles included in the collection are interface role, VLT role, BGP role, and so on. The docs directory in the collection includes documentation for each of the roles in the collection. The roles mentioned are summarized as follows:
- Interface role—The os10_interface role facilitates the configuration of interface attributes. It supports the configuration of administrative state, description, MTU, IP address, IP helper, and port mode.
- BGP role—The os10_bgp role facilitates the configuration of border gateway protocol (BGP) attributes and supports router ID, networks, neighbors, and maximum path configurations.
- VLT role—The os10_vlt role facilitates the configuration of the basics of virtual link trunking (VLT) to provide a loop-free topology.
Using roles:
- Helps simplify writing complex playbooks.
- Allows you to reuse common configurations without having to write tasks.
- Provides another layer of abstraction that can be useful for organizing playbooks.