Puppet Class: httpproxy::git
- Defined in:
- manifests/git.pp
Overview
git.pp (private class) Manages proxy for git
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'manifests/git.pp', line 21
class httpproxy::git {
$ensure = $httpproxy::git ? {
true => $httpproxy::ensure,
default => $httpproxy::git,
}
if $httpproxy::git::ensure == 'present' {
exec { 'git-proxy':
command => "/usr/bin/git config --system http.proxy ${httpproxy::proxy_uri}",
unless => "[[ \"$(git config --system --get http.proxy)\" == \"${httpproxy::proxy_uri}\" ]]",
# path => [ '/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin' ],
}
} elsif $httpproxy::git::ensure == 'absent' {
exec { 'git-proxy':
command => '/usr/bin/git config --system --unset http.proxy',
unless => '[[ -z "$(git config --system --get http.proxy)" ]]',
# path => [ '/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin' ],
}
}
}
|