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": {}
|
||||
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}"],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue