Sha256: 0264f90d1d045ae51981e3442fab025d18de6619ad0f37db40a174c80eb31c79

Contents?: true

Size: 781 Bytes

Versions: 23

Compression:

Stored size: 781 Bytes

Contents

require 'chef/provider/lwrp_base'
require 'chef/provisioning/chef_provider_action_handler'
require 'chef/provisioning/machine'

class Chef
class Provider
class MachineExecute < Chef::Provider::LWRPBase

  def action_handler
    @action_handler ||= Chef::Provisioning::ChefProviderActionHandler.new(self)
  end

  use_inline_resources

  def whyrun_supported?
    true
  end

  def machine
    @machine ||= begin
      if new_resource.machine.kind_of?(Chef::Provisioning::Machine)
        new_resource.machine
      else
        run_context.chef_provisioning.connect_to_machine(new_resource.machine, new_resource.chef_server)
      end
    end
  end

  action :run do
    machine.execute(action_handler, new_resource.command, :stream => new_resource.live_stream)
  end

end
end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
chef-provisioning-2.0.0 lib/chef/provider/machine_execute.rb
chef-provisioning-1.9.1 lib/chef/provider/machine_execute.rb
chef-provisioning-1.9.0 lib/chef/provider/machine_execute.rb
chef-provisioning-1.8.1 lib/chef/provider/machine_execute.rb
chef-provisioning-1.8.0 lib/chef/provider/machine_execute.rb
chef-provisioning-1.7.1 lib/chef/provider/machine_execute.rb
chef-provisioning-1.7.0 lib/chef/provider/machine_execute.rb
chef-provisioning-1.6.0 lib/chef/provider/machine_execute.rb
chef-provisioning-1.5.1 lib/chef/provider/machine_execute.rb
chef-provisioning-1.5.0 lib/chef/provider/machine_execute.rb
chef-provisioning-1.4.1 lib/chef/provider/machine_execute.rb
chef-provisioning-1.4.0 lib/chef/provider/machine_execute.rb
chef-provisioning-1.3.0 lib/chef/provider/machine_execute.rb
chef-provisioning-1.2.1 lib/chef/provider/machine_execute.rb
chef-provisioning-1.2.0 lib/chef/provider/machine_execute.rb
chef-provisioning-1.1.1 lib/chef/provider/machine_execute.rb
chef-provisioning-1.1.0 lib/chef/provider/machine_execute.rb
chef-provisioning-1.0.1 lib/chef/provider/machine_execute.rb
chef-provisioning-1.0.0 lib/chef/provider/machine_execute.rb
chef-provisioning-1.0.0.rc.2 lib/chef/provider/machine_execute.rb