From b525210b5c0e80c9e73c08966449a9493c950b54 Mon Sep 17 00:00:00 2001 From: Joshua Hoblitt Date: Wed, 2 Mar 2016 17:26:28 -0700 Subject: [PATCH] create $proxy_server variable in init.pp This variable has the proxy server / port in the format expected by puppet/archive. --- manifests/init.pp | 6 ++++++ manifests/plugin.pp | 8 -------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 4b4ae88f1..c9eeeb40f 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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') { diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 10736ef73..32dae038c 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -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,