Ansible Galaxy is the Ansible hub for sharing and reusing Ansible roles. Thousands of roles written by community are available for reuse. These roles are open sourced. Keep in mind that before using these roles, read them and understand them. Let us install a role from Ansible Galaxy.
ansible-galaxy install training-devops.el-repos
Above is a simple role to install EPEL and Remi repos. To understand the role better, it is advisable to browse through the role source which is available at github page. Note how this role uses best practices.