Puppet Class: cassandra::config::rackdc

Defined in:
manifests/config/rackdc.pp

Summary

Class to manage the `cassandra-rackdc.properties` file

Overview

This class manages the cassandra-rackdc.properties file, which is needed when using GossippingPropertyFileSnitch.

This class is contained with config, thus do not use it for its own.

Examples:

simple rack and DC settings

cassandra::rackdc:
  dc: dc1
  rack: rackA

rack, DC and dc_suffix settings

cassandra::rackdc:
  dc: dc1
  rack: rackA
  dc_suffix: .example.org


19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'manifests/config/rackdc.pp', line 19

class cassandra::config::rackdc {
  $path = "${cassandra::config_dir}/cassandra-rackdc.properties"

  if $cassandra::rackdc =~ Hash {
    file { $path:
      ensure  => 'file',
      content => epp('cassandra/cassandra-rackdc.properties.epp'),
    }
  } else {
    file { $path:
      ensure => 'absent',
    }
  }
}