Hi all,

We have been using ansible for a while now and have created a bunch of 
roles which are working really well.  We have been really enjoying the way 
ansible works, and that it is easily extensible for those bits that are not 
generic.

Up until now we have been busy with creating things, ec2 instances with 
disks and an initial install etc.  So all our roles for the most part are 
about creating things.  The next step is for the maintenance, i.e. updating 
and removing/deleting.  So, for instance we have a continuous integration 
chain that creates instances for testing, and now I want to set up a series 
of tasks that remove these instances when the branch is merged.  The 
question is how best to organize these different operations on the same 
function or role.  So, we are calling our full system a silo.  It has a db, 
web servers (nodejs), nginx dispatching etc.  For a bunch of these roles we 
will now have two separate operations, and will be adding an update to 
others, how are people handling this, as I cannot believe we are the first 
by any stretch. :)

The roles are ideally a flat set of directories within the roles directory, 
but what we actually want is something like this.
- silo create
- silo remove
- silo delete

I have thought about resorting to paths in the calls to roles and having a 
higherarchical directory structure, e.g.

roles/
    silo/
        create/
        remove/
        update/

This has some advantages and disadvantages:
- The update and create roles would be very similar as far as role 
dependencies but this would have to be duplicated, but it would mean that 
remove would not be worrying about running extra dependencies.

- Just calling a silo role by name would no longer work, and specific paths 
would have to be given, so a bunch of the nice out of the box convention 
over configuration would break.

I would love some advice, because our needs are only going to get more 
complicated.  Are people using tags for this sort of thing?  Are there some 
hidden features I am missing, or a better way of looking at the setup?

Thanks in advance for any help,

Rohan Nicholls


-- 
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/c98fe7e7-c9cd-487c-9988-8e450da96a54%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to