Puppet Class: httpproxy::profiled
- Defined in:
- manifests/profiled.pp
Overview
Profiled.pp (private class) Manages proxies in profile.d Uses the unibet/profiled module forge.puppetlabs.com/unibet/profiled
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'manifests/profiled.pp', line 24
class httpproxy::profiled {
$ensure = $httpproxy::profiled ? {
true => $httpproxy::ensure,
default => $httpproxy::profiled,
}
if $httpproxy::no_proxy {
$lines = [
'# Set http proxy for shell',
"export http_proxy=${httpproxy::proxy_uri}",
"export https_proxy=${httpproxy::proxy_uri}",
"export no_proxy=${httpproxy::no_proxy}",
]
}
else {
$lines = [
'# Set http proxy for shell',
"export http_proxy=${httpproxy::proxy_uri}",
"export https_proxy=${httpproxy::proxy_uri}",
]
}
# shell paramter enables or disables the shabang at the top of the bash script.
profiled::script { 'httpproxy.sh':
ensure => $ensure,
content => join($lines, "\n"),
shell => 'absent',
}
}
|