Skip to content

Commit

Permalink
Merge pull request voxpupuli#53 from dhoppe/install_dir
Browse files Browse the repository at this point in the history
Fix parameter install_dir/install_directory. This closes voxpupuli#52
  • Loading branch information
igalic committed Mar 15, 2016
2 parents 0562352 + 189466e commit 707fbe4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion manifests/consumer.pp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
class kafka::consumer (
$version = $kafka::params::version,
$scala_version = $kafka::params::scala_version,
$install_dir = '',
$install_dir = $kafka::params::install_dir,
$mirror_url = $kafka::params::mirror_url,
$config = {},
$config_defaults = $kafka::params::consumer_config_defaults,
Expand Down
6 changes: 4 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
class kafka (
$version = $kafka::params::version,
$scala_version = $kafka::params::scala_version,
$install_dir = '',
$install_dir = $kafka::params::install_dir,
$mirror_url = $kafka::params::mirror_url,
$install_java = $kafka::params::install_java,
$package_dir = $kafka::params::package_dir
Expand All @@ -51,7 +51,9 @@
$basefilename = "kafka_${scala_version}-${version}.tgz"
$package_url = "${mirror_url}/kafka/${version}/${basefilename}"

if $install_dir == '' {
if $version != $kafka::params::version {
$install_directory = "/opt/kafka-${scala_version}-${version}"
} elsif $scala_version != $kafka::params::scala_version {
$install_directory = "/opt/kafka-${scala_version}-${version}"
} else {
$install_directory = $install_dir
Expand Down
2 changes: 1 addition & 1 deletion manifests/mirror.pp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
class kafka::mirror (
$version = $kafka::params::version,
$scala_version = $kafka::params::scala_version,
$install_dir = '',
$install_dir = $kafka::params::install_dir,
$mirror_url = $kafka::params::mirror_url,
$consumer_config = {},
$consumer_config_defaults = $kafka::params::consumer_config_defaults,
Expand Down
2 changes: 1 addition & 1 deletion manifests/producer.pp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
class kafka::producer (
$version = $kafka::params::version,
$scala_version = $kafka::params::scala_version,
$install_dir = '',
$install_dir = $kafka::params::install_dir,
$mirror_url = $kafka::params::mirror_url,
$config = {},
$config_defaults = $kafka::params::producer_config_defaults,
Expand Down

0 comments on commit 707fbe4

Please sign in to comment.