|
From: | Jens Rantil |
Subject: | Re: [Fab-user] Multiple roles with partly shared configuration? |
Date: | Sat, 10 Aug 2013 23:09:24 -0400 |
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 <address@hidden>: 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 address@hidden https://lists.nongnu.org/mailman/listinfo/fab-user |
[Prev in Thread] | Current Thread | [Next in Thread] |