Hey Jens, thanks for the reply. Yeah, I sent the first two before I confirmed to be subscribed. I thought maybe they got rejected, so I sent a third one. Won't happen again ;)
As for your suggestions I really like the first one. Both, the cli call and the implementation seem to be very clean then. Thank you very much :) dAnjou 2013/8/11 Jens Rantil <jens.ran...@gmail.com> > Hi dAnjou, > > I see that noone has responded to you, so I'll give it a shot. It seems > like you posted three separate, but duplicate e-mails, to this group. Let's > hope all succeeding replies stick to this thread to keep things searchable > and browsable. One e-mail is enough in the future. ;-) > > There's multiple ways of doing what you want. Either way, I'd use > functions and not classes. I guess it's just a personal preference. Pick > and choose: > > 1. Setting up initial state in a task: Create one task that configures > your env variable with all information needed to execute further tasks. > This makes it possible to execute > > $ fab master deploy > ... > $ fab slaves deploy > ... > > This works especially well if deployment is fairly similar. > > 2. Use two "meta" tasks; ie. 'deploy_master' and 'deploy_slaves'. These > two tasks can set up env state and call the individual tasks (possibly > using `execute`[1]) needed to execute the individual steps of each > deployment. > > [1] > http://docs.fabfile.org/en/1.7/api/core/tasks.html?highlight=execute#fabric.tasks.execute > > Cheers, > Jens > > Sent from my iPhone 5S > > 9 aug 2013 kl. 18:00 skrev dAnjou <m...@danjou.de>: > > > Hi, > > > (first post here) > > > I have two roles (lets call them master and slaves). They have a different > deployment setup but they share a particular set of configuration options. > Other options are different though. What is the best way in fabric to do > this kind of thing? All I can imagine is having a base config class and > then two subclasses that override or add certain options. > > > Thanks in advance. > > > dAnjou > > _______________________________________________ > > Fab-user mailing list > > Fab-user@nongnu.org > > https://lists.nongnu.org/mailman/listinfo/fab-user > >
_______________________________________________ Fab-user mailing list Fab-user@nongnu.org https://lists.nongnu.org/mailman/listinfo/fab-user