Add repos. Install software from the repos that do not require any extra configuration. Software with configuration should be in new roles.
ansible 2.1 (because yum_repository module)
see defaults/main.yml
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: ansible-role-yum }
MIT