crafterm / sprinkle

Sprinkle is a software provisioning tool you can use to build remote servers with. eg. to install a Rails, or Sinatra stack on a brand new slice directly after its been created

sprinkle / lib / sprinkle / actors / local.rb
4b89a0d5 » crafterm 2008-08-02 Add support for provisionin... 1 module Sprinkle
2 module Actors
3 # = Local Delivery Method
4 #
5 # This actor implementation performs any given commands on your local system, as
6 # opposed to other implementations that generally run commands on a remote system
7 # via the network.
8 #
9 # This is useful if you'd like to use Sprinkle to provision your local machine.
10 # To enable this actor, in your Sprinkle script specify the :local delivery mechanism.
11 #
12 # deployment do
13 # delivery :local
14 # end
15 #
16 # Note, your local machine will be assumed to be a member of all roles when applying policies
17 #
18 class Local
19
20 def process(name, commands, roles, suppress_and_return_failures = false) #:nodoc:
72528eb9 » jsierles 2008-11-25 make local actor return fal... 21 commands.each do |command|
22 system command
23 return false if $?.to_i != 0
24 end
25 return true
4b89a0d5 » crafterm 2008-08-02 Add support for provisionin... 26 end
27
28 end
29 end
30 end