Sha256: 8631e11bb8788a1023e5811d4168d5251fe8a3af05048c49253b4da724a7052b

Contents?: true

Size: 898 Bytes

Versions: 17

Compression:

Stored size: 898 Bytes

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
      
    end
  end
end

Version data entries

17 entries across 17 versions & 6 rubygems

Version Path
crafterm-sprinkle-0.2.0 lib/sprinkle/actors/local.rb
crafterm-sprinkle-0.2.1 lib/sprinkle/actors/local.rb
crafterm-sprinkle-0.2.2 lib/sprinkle/actors/local.rb
justsee-sprinkle-0.2.4 lib/sprinkle/actors/local.rb
lachlan-sprinkle-0.0.1 lib/sprinkle/actors/local.rb
lachlan-sprinkle-0.0.2 lib/sprinkle/actors/local.rb
lachlan-sprinkle-0.0.3 lib/sprinkle/actors/local.rb
lachlan-sprinkle-0.0.4 lib/sprinkle/actors/local.rb
lachlan-sprinkle-0.0.5 lib/sprinkle/actors/local.rb
lachlan-sprinkle-0.0.6 lib/sprinkle/actors/local.rb
lachlan-sprinkle-0.0.7 lib/sprinkle/actors/local.rb
lachlan-sprinkle-0.0.8 lib/sprinkle/actors/local.rb
mdwan-sprinkle-0.2.2 lib/sprinkle/actors/local.rb
mdwan-sprinkle-0.2.3 lib/sprinkle/actors/local.rb
trevorturk-sprinkle-0.2.2 lib/sprinkle/actors/local.rb
sprinkle-0.2.2 lib/sprinkle/actors/local.rb
sprinkle-0.2.1 lib/sprinkle/actors/local.rb