I'm a little confused in understanding the exact purpose of roles. Reading 
http://docs.ansible.com/ansible/playbooks_roles.html , the first examples 
use a 1:1 association between role and hosts group (eg webservers and 
dbservers). This makes the "role" terminology meaningful to me, as it is 
representing a set of machines which have a role in the infrastructure. 
However, later in the same web page I see examples with roles named 
"apache" and "postgres", which are only applications in one or more 
machines. I'd assume that the setup of these applications would be only 
tasks, not roles. 

Questions:

- In the first case, could not I simply associate a group of hosts with 
variables? Why use roles?
- In the second case, could I not simply associate a group of hosts with 
"apache" and "postgres" setup tasks? Why use roles?

At first sight, roles seem overkill to me, specially in a small 
infrastructure with a few machines such as the one I have.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/bcbdba7d-8c7d-4c14-b42b-d177a7faf763%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to