Defined Type: confluent::kafka_environment_variable

Defined in:
manifests/kafka_environment_variable.pp

Overview

A define to manage the environemnt files used for launching Kafka. This would most likely be JVM settings.

Examples:

Setting a property.

confluent::kafka_environment_variable{'KAFKA_HEAP_OPTS':
  ensure      => present,
  path        => '/etc/sysconfig/kafka',
  value       => '-Xmx4000M',
  application => 'kafka'
}

Parameters:

  • ensure (Any) (defaults to: 'present')

    present to add the property. absent to remove the property.

  • path (Any)

    The path to the file containing the java property.

  • value (Any) (defaults to: unset)

    The value to be set.

  • application (Any)

    The application requesting the change. Property names are often duplicated. This ensures a unique resource name



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'manifests/kafka_environment_variable.pp', line 14

define confluent::kafka_environment_variable (
  $path,
  $application,
  $ensure = 'present',
  $value  = unset,
) {
  $setting_name = "${application}_${name}"

  validate_absolute_path($path)

  ini_subsetting { $setting_name:
    ensure            => $ensure,
    path              => $path,
    section           => '',
    setting           => $name,
    subsetting        => '',
    key_val_separator => '=',
    quote_char        => '"',
    tag               => "${application}-setting",
    value             => $value
  }
}