Added http proxy support to custom::file
This commit is contained in:
parent
d88825f9b9
commit
197d9389b4
1 changed files with 9 additions and 5 deletions
|
@ -67,11 +67,15 @@ define custom::file($ensure, $group="NONE", $mode="NONE", $owner="NONE", $seltyp
|
||||||
"puppet": {}
|
"puppet": {}
|
||||||
default: {
|
default: {
|
||||||
exec { "fetch-file-${source}":
|
exec { "fetch-file-${source}":
|
||||||
path => "/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin",
|
environment => $http_proxy ? {
|
||||||
cwd => regsubst($name, '(.*)/[^/]+$', '\1'),
|
"" => undef,
|
||||||
command => $fetch_cmd,
|
default => "http_proxy=${http_proxy}",
|
||||||
unless => $diff_cmd,
|
},
|
||||||
before => File["${name}"],
|
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}"],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue