From fefb0fba1d25bb803807c3f8e4c34c684f92e755 Mon Sep 17 00:00:00 2001 From: Tomas Barton Date: Thu, 27 Jun 2019 10:22:05 +0200 Subject: [PATCH] Pass proxy_server only when defined (#133) --- manifests/init.pp | 1 + manifests/install/archive.pp | 8 +++++++- manifests/params.pp | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 398ed42..98f958a 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -22,6 +22,7 @@ String $archive_symlink_name = $::zookeeper::params::archive_symlink_name, String $archive_version = $::zookeeper::params::archive_version, Optional[String] $proxy_server = $::zookeeper::params::proxy_server, + Optional[String] $proxy_type = $::zookeeper::params::proxy_type, Optional[String] $cdhver = $::zookeeper::params::cdhver, Boolean $install_java = $::zookeeper::params::install_java, String $install_method = $::zookeeper::params::install_method, diff --git a/manifests/install/archive.pp b/manifests/install/archive.pp index eb4cc1d..87a8c40 100644 --- a/manifests/install/archive.pp +++ b/manifests/install/archive.pp @@ -33,7 +33,6 @@ user => 'root', group => 'root', source => $download_url, - proxy_server => $::zookeeper::proxy_server, checksum => $::zookeeper::archive_checksum['hash'], checksum_type => $::zookeeper::archive_checksum['type'], extract_path => $::zookeeper::archive_install_dir, @@ -46,6 +45,13 @@ notify => Exec['chown_zookeeper_directory'], } + if $::zookeeper::proxy_server { + Archive<| title == $archive_file |> { + proxy_server => $::zookeeper::proxy_server, + proxy_type => $::zookeeper::proxy_type, + } + } + $symlink_require = Archive["${::zookeeper::archive_install_dir}/${filename}.tar.gz"] exec { 'chown_zookeeper_directory': diff --git a/manifests/params.pp b/manifests/params.pp index d8f1bc3..440dde5 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -84,6 +84,7 @@ $java_package = undef $repo = undef $proxy_server = undef + $proxy_type = undef # service options $manage_service = true