On Tue, Jun 3, 2014 at 1:37 AM, <[email protected]> wrote: > Yes. I'm only new to ansible but am seriously struggling. The playbooks I > can get my head around but the roles are proving very painful. I thought > the idea might be to switch features on/off for each host via variables? > Would that work? >
I suggest you look at lots of other people's roles and playbooks. Roles are just a way to group tasks, handlers, and files/templates they use, so they are just a basic grouping around normal ansible syntax. > > [Trivial annoyance: i hate the way it requires a bunch of folders with > just one file in them each] > Sorry, this will not be changing. > [Related to that sidenote: the folders are going to have lonely main.ymls > for quite a while since the only apparent use of a file in the same > directory is to be 'included' from main.yml? Have I got that wrong?] > You can also put things in the main.yaml. > > > On Tuesday, June 3, 2014 2:38:45 PM UTC+10, David Carmean wrote: >> >> >> I was happy to see "roles" when I came back to Ansible after a few >> months, but i've been struggling with how to apply them. I think this is >> partly because of cognitive dissonance between my mental model and the >> current terminology. >> >> In my mind, any particular role that a server may fill (and it may fill >> more than one), in turn requires one or more "features" or "feature-sets" >> in order to be able to fulfill that role. In other words, I think of a >> heirarchy that looks like this; >> >> * appstack_X >> ** server_n >> *** role_a >> **** feature_A >> **** feature_E >> **** feature_O >> *** role_b >> **** feature_A >> **** feature_B >> **** feature_G >> >> Anyone else gone through this thought process,or organize their configs >> like this? >> >> >> >> -- > 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/fe22dca9-a01c-4afc-afea-7cf5acbc84e2%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/fe22dca9-a01c-4afc-afea-7cf5acbc84e2%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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/CA%2BnsWgwzw0EXyhk2zVqR%3DEP9hAVwUyn-OA1qYYe47QsHJzoYLw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
