[chef] Using machine_file resource for upload


Chronological Thread 
  • From: Christine Draper < >
  • To:
  • Subject: [chef] Using machine_file resource for upload
  • Date: Tue, 27 Jan 2015 21:09:54 -0600

Hi,

I am trying to upload a file using chef provisioning machine_file. I am getting the error below. Am I doing something wrong or is there a bug?


The following works OK so I'm not desperate, just curious/keen to learn.

machine 'appserver' do
  files(
        '/twi/pkg/INT/ypo.tar.gz' => '/twi/pkg/INT/ypo.tar.gz',
       )
end

--------------------------------------------------------------------------------

 * machine_file[/twi/pkg/INT/ypo.tar.gz] action upload[2015-01-27T21:05:12-06:00] INFO: Processing machine_file[/twi/pkg/INT/ypo.tar.gz] action upload (@recipe_files::/home/christine/test/provision/deploy.rb line 3)
[2015-01-27T21:05:14-06:00] INFO: Executing sudo ls -d /twi/pkg/INT/ypo.tar.gz on ">
[2015-01-27T21:05:17-06:00] INFO: Completed ls -d /twi/pkg/INT/ypo.tar.gz on "> : exit status 0
[2015-01-27T21:05:17-06:00] INFO: Executing sudo md5sum -b /twi/pkg/INT/ypo.tar.gz on ">
[2015-01-27T21:05:18-06:00] INFO: Completed md5sum -b /twi/pkg/INT/ypo.tar.gz on "> : exit status 0
       ================================================================================
    Error executing action `upload` on resource 'machine_file[/twi/pkg/INT/ypo.tar.gz]'
    ================================================================================
   
    TypeError
    ---------
    no implicit conversion of nil into String
   
    Resource Declaration:
    ---------------------
    # In /home/christine/test/provision/deploy.rb
   
      3: machine_file '/twi/pkg/INT/ypo.tar.gz' do
      4:  machine 'appserver'
      5:   path '/twi/pkg/INT/ypo.tar.gz'
      6:   action :upload
      7: end
      8:
----------------------------------------------------------------

Regards,
Christine



Archive powered by MHonArc 2.6.16.

§