Skip to content

Commit

Permalink
create $proxy_server variable in init.pp
Browse files Browse the repository at this point in the history
This variable has the proxy server / port in the format expected by
puppet/archive.
  • Loading branch information
jhoblitt committed Mar 3, 2016
1 parent f7691ef commit b525210
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 6 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,14 @@
require => Package['jenkins'],
notify => Service['jenkins']
}

# param format needed by puppet/archive
$proxy_server = "http://${jenkins::proxy_host}:${jenkins::proxy_port}"
} else {
$proxy_server = undef
}


include jenkins::service

if defined('::firewall') {
Expand Down
8 changes: 0 additions & 8 deletions manifests/plugin.pp
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,6 @@
}

if (empty(grep($installed_plugins, $search))) {
if ($jenkins::proxy_host) {
# archive expects protocol in proxy_server, but jenkins proxy.xml expects no protocol
# assume http
$proxy_server = "http://${jenkins::proxy_host}:${jenkins::proxy_port}"
} else {
$proxy_server = undef
}

$enabled_ensure = $enabled ? {
false => present,
default => absent,
Expand Down

0 comments on commit b525210

Please # to comment.