Defined Type: cassandra::environment::variable

Defined in:
manifests/environment/variable.pp

Summary

Creating an environment variable for Cassandra.

Overview

Each instance of this type is adding a environment variable to the Cassandra process. This enables you to set e.g. MAX_HEAP_SIZE, HEAP_NEWSIZE, etc.

The config class contains a factory for this type which will create instances for each key of cassandra::environment.

Examples:

directly created

cassandra::environment::variable { 'MAX_HEAP_SIZE':
  value => '8G',
}

factory generated

cassandra::environment:
  MAX_HEAP_SIZE: 8G
  HEAP_NEWSIZE: 2G

Parameters:

  • id (String) (defaults to: $title)

    name of the environment variable

  • value (String)

    value to be assigned to the variable



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'manifests/environment/variable.pp', line 25

define cassandra::environment::variable (
  String $value,
  String $id = $title,
) {
  concat::fragment{ "cassandra::environment::variable[${id}]=${value}":
    target  => $cassandra::envfile,
    order   => '10',
    content => inline_epp('<%= $name %>="<%= $val -%>"',
      {
        'name' => $id,
        'val'  => $value,
      }
    )
  }
}