example42 / puppi

Puppet module to manage applications deployments and servers local management
http://www.example42.com
Other
142 stars 84 forks source link

When Downloaded file name is not as the bzip2 file #80

Open shyperets opened 10 years ago

shyperets commented 10 years ago

Please try run the following manifest :

include puppi

file { "/opt/local/": ensure => "directory", owner => "root", group => "root", mode => 755, }

puppi::netinstall { 'wkhtmltoimage-amd64': url => 'https://wkhtmltopdf.googlecode.com/files/wkhtmltoimage-0.11.0_rc1-static-amd64.tar.bz2', destination_dir => '/opt/local', postextract_command => '/bin/cp /opt/local/wkhtmltoimage-amd64 /usr/local/bin/wkhtmltopdf', }

Looks like its looking to chown to file which is not exists and after manipulating that , Its not running the post extract command .

Please help ,

alvagante commented 10 years ago

Going to fix this, for the moment check #70 and #64 for the extracted_dir parameter

shyperets commented 10 years ago

Thanks for the comment ,

I try to see the input you send me and update my manifest according , its not looks like the problem solved :

file { "/opt/capriza": ensure => "directory", owner => "root", group => "root", mode => 755, }

puppi::netinstall { 'wkhtmltoimage': url => 'https://wkhtmltopdf.googlecode.com/files/wkhtmltoimage-0.11.0_rc1-static-amd64.tar.bz2', destination_dir => '/opt/capriza', # Must Exist extracted_dir => '.', postextract_command => 'cp /opt/capriza/wkhtmltoimage-amd64 /usr/local/bin/wkhtmltopdf', }

After running this one , I can not find the file he downloaded in my system , file name wkhtmltoimage-amd64

Is that what you mean by addressing me to the links ?

alvagante commented 10 years ago

This is an edge case because the tarball actually contains a single file (whose name can't be detected from the tarball name) and the current netinstall implementation expects a directory as cwd when executing the post_install command. So basically you can have what you need with something like (ugly but works): puppi::netinstall { 'wkhtmltoimage': url => ' https://wkhtmltopdf.googlecode.com/files/wkhtmltoimage-0.11.0_rc1-static-amd64.tar.bz2 ', destination_dir => '/opt/capriza', # The Parent Must Exist ( /opt ) extracted_dir => 'wkhtmltoimage-amd64',

postextract_command => 'cp /opt/capriza/wkhtmltoimage-amd64

/usr/local/bin/wkhtmltopdf', # } exec { 'post_netinstall': command => 'cp /opt/capriza/wkhtmltoimage-amd64 /usr/local/bin/wkhtmltopdf', subscribe => Puppi::Netinstall['wkhtmltoimage'], path => '/bin:/sbin:/usr/bin:/usr/sbin', refreshonly => true, }

On Sun, Jul 21, 2013 at 3:40 PM, shyperets notifications@github.com wrote:

Thanks for the comment ,

I try to see the input you send me and update my manifest according , its not looks like the problem solved :

file { "/opt/capriza":

ensure => "directory", owner => "root", group => "root", mode => 755, }

puppi::netinstall { 'wkhtmltoimage':

url => ' https://wkhtmltopdf.googlecode.com/files/wkhtmltoimage-0.11.0_rc1-static-amd64.tar.bz2 ', destination_dir => '/opt/capriza', # Must Exist extracted_dir => '.', postextract_command => 'cp /opt/capriza/wkhtmltoimage-amd64 /usr/local/bin/wkhtmltopdf', }

After running this one , I can not find the file he downloaded in my system , file name wkhtmltoimage-amd64

Is that what you mean by addressing me to the links ?

— Reply to this email directly or view it on GitHubhttps://github.com/example42/puppi/issues/80#issuecomment-21310207 .

shyperets commented 10 years ago

Thanks , Works ! Please update when bug was fixed , nice day :+1: