Sha256: e50ce7564348a5894bb559d46a5714ef7dc396eeab793c3eea16b0bd7bbecee0
Contents?: true
Size: 1.08 KB
Versions: 23
Compression:
Stored size: 1.08 KB
Contents
module Sprinkle module Actors # = Local Delivery Method # # This actor implementation performs any given commands on your local system, as # opposed to other implementations that generally run commands on a remote system # via the network. # # This is useful if you'd like to use Sprinkle to provision your local machine. # To enable this actor, in your Sprinkle script specify the :local delivery mechanism. # # deployment do # delivery :local # end # # Note, your local machine will be assumed to be a member of all roles when applying policies # class Local def process(name, commands, roles, suppress_and_return_failures = false) #:nodoc: commands.each do |command| system command return false if $?.to_i != 0 end return true end def transfer(name, source, destination, roles, recursive = true, suppress_and_return_failures = false) if recursive flags = "-R " end system "cp #{flags}#{source} #{destination}" end end end end
Version data entries
23 entries across 23 versions & 6 rubygems