From df7753be27ff7af4aa3fdd400080b725264e741c Mon Sep 17 00:00:00 2001 From: Stuart Fox Date: Mon, 2 Mar 2015 16:21:14 -0800 Subject: [PATCH] On some ubuntu systems curl -o doesnt work, changed to curl $src > $tgt Ensure /mnt/src exists before downloading --- manifests/download.pp | 4 ++-- manifests/init.pp | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/manifests/download.pp b/manifests/download.pp index 6067f15..44e09e0 100644 --- a/manifests/download.pp +++ b/manifests/download.pp @@ -102,7 +102,7 @@ } exec {"download digest of archive ${name}": - command => "curl -s -S ${insecure_arg} ${redirect_arg} -o ${src_target}/${name}.${digest_type} '${digest_src}'", + command => "curl -s -S ${insecure_arg} ${redirect_arg} '${digest_src}' > ${src_target}/${name}.${digest_type}", creates => "${src_target}/${name}.${digest_type}", timeout => $timeout, path => $path, @@ -144,7 +144,7 @@ default => undef, } exec {"download archive ${name} and check sum": - command => "curl -s -S ${insecure_arg} ${redirect_arg} -o ${src_target}/${name} '${url}'", + command => "curl -s -S ${insecure_arg} ${redirect_arg} '${url}' > ${src_target}/${name}", creates => "${src_target}/${name}", logoutput => true, timeout => $timeout, diff --git a/manifests/init.pp b/manifests/init.pp index 351ee45..860718f 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -43,6 +43,10 @@ $verbose=true, ) { + file { '/usr/src': + ensure => directory, + } + archive::download {"${name}.${extension}": ensure => $ensure, url => $url, @@ -55,6 +59,7 @@ allow_insecure => $allow_insecure, follow_redirects => $follow_redirects, verbose => $verbose, + require => File['/usr/src'], } archive::extract {$name: