Skip to content

Commit

Permalink
Pass proxy_server only when defined (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
deric committed Jun 27, 2019
1 parent d545245 commit fefb0fb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 7 additions & 1 deletion manifests/install/archive.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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':
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
$java_package = undef
$repo = undef
$proxy_server = undef
$proxy_type = undef

# service options
$manage_service = true
Expand Down

0 comments on commit fefb0fb

Please sign in to comment.