$filename is missing on specific download location
Closed this issue · 1 comments
Jack12816 commented
class {'::wkhtmltox':
ensure => present,
use_downloader => true,
download_url => 'http://0.0.0.0:8080/packages/wkhtmltopdf',
wkhtml_filename => 'wkhtmltox-0.12.1_linux-trusty-amd64.deb'
}
Results in:
==> default: Error: Execution of '/usr/bin/dpkg --force-confold -i /tmp/' returned 1: dpkg-split: error: error reading /tmp/: Is a directory
==> default: dpkg: error processing archive /tmp/ (--install):
==> default: subprocess dpkg-split returned error exit status 2
==> default: Errors were encountered while processing:
==> default: /tmp/
==> default:
==> default: Error: /Stage[main]/Wkhtmltox/Package[wkhtmltox]/ensure: change from purged to present failed: Execution of '/usr/bin/dpkg --force-confold -i /tmp/' returned 1: dpkg-split: error: error reading /tmp/: Is a directory
==> default: dpkg: error processing archive /tmp/ (--install):
==> default: subprocess dpkg-split returned error exit status 2
==> default: Errors were encountered while processing:
==> default: /tmp/
==> default:
The problem is the filename
variable:
if $wkhtml_filename {
$download_location = "${download_url}/${wkhtml_filename}"
## => $filename is missing
}
else {
$filename = "wkhtmltox-${version}_linux-${osver}-${arch}.${packagetype}"
$download_location = "${download_url}/${version}/${filename}"
}
Jack12816 commented
Well done. :) Thank you.