...Technically, a role presents a single entry point, its tasks/main.yml. Because of this design, one might think it's difficult to have a role accomplish several actions (without using tags, cf below, or includes).
And still, there is a way to write reusable roles easily, including different unrelated operations.
Using a variable to decide which action to perform, you can have a small operation router inside your role
Item 7 from http://blog.ippon.tech/ansible-tips-and-tricks/
...Technically, a role presents a single entry point, its tasks/main.yml. Because of this design, one might think it's difficult to have a role accomplish several actions (without using tags, cf below, or includes).
And still, there is a way to write reusable roles easily, including different unrelated operations.
Using a variable to decide which action to perform, you can have a small operation router inside your role