chef-boneyard / chef-provisioning-ssh

Provision Machines Via SSH or WinRM Using Chef Provisioning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

machine_file resource not working

PierreRambaud opened this issue · comments

commented

Hi,
When using machine_file resource, I got this error:

undefined local variable or method `action_handler' for #<Chef::Provisioning::SshDriver::Driver:0x007fdbea552760>

Line: https://github.com/double-z/chef-provisioning-ssh/blob/master/lib/chef/provisioning/ssh_driver/driver.rb#L144

Regards

commented

To reproduce:

  machine 'mymachine' do
    add_machine_options transport_options: {
      'ip_address' => ip,
      'host' => host
    }
    action :allocate
  end

  machine_file '/tmp/mypackage.tar.gz' do
    machine 'mymachine'
    path 'mypackage.tar.gz'
    action :upload
  end

  machine 'mymachine' do
    role 'website'
    converge true
  end

Nice Find. I assume you are using the latest version (0.0.5)?

I'll take a look at that tonight, pretty sure I know what it is.

commented

Yes, I'm using the latest version.
More, I try to find an explication about how it's possible to retrieve ssh options with  existing_machine_hash but there are conflicts between Symbol and String when calling machine_options[:transport_options].
I will try to have a look today too ;)

Regards

So this was fixed for *nix machines with v0.0.6. it affected both machine_file and machine_execute, both of which now work. windows functionality with respect to this is still broken however, i will create a separate issue for that.

commented

Thanks a lot, I will have a look when I will have the time (maybe in one or two weeks),
Regards

commented

It works ;)