diff --git a/custom/manifests/init.pp b/custom/manifests/init.pp index 23f28d3..9bd6ab7 100644 --- a/custom/manifests/init.pp +++ b/custom/manifests/init.pp @@ -67,11 +67,15 @@ define custom::file($ensure, $group="NONE", $mode="NONE", $owner="NONE", $seltyp "puppet": {} default: { exec { "fetch-file-${source}": - path => "/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin", - cwd => regsubst($name, '(.*)/[^/]+$', '\1'), - command => $fetch_cmd, - unless => $diff_cmd, - before => File["${name}"], + environment => $http_proxy ? { + "" => undef, + default => "http_proxy=${http_proxy}", + }, + path => "/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin", + cwd => regsubst($name, '(.*)/[^/]+$', '\1'), + command => $fetch_cmd, + unless => $diff_cmd, + before => File["${name}"], } } }