Defined Type: zookeeperd::node
- Defined in:
- manifests/node.pp
Summary
A short summary of the purpose of this defined type.Overview
zookeeperd::node
A node definition to be added as server line in zoo.cfg file. One may define the nodes of an zookeeper ensamble by instanciating this resource. The module itself is implementing a factory to create nodes to all keys added to zookeeperd::nodes hash. This resource is also used with autoconfiguration, which exports this resource and collect all exported nodes of the same ensamble.
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'manifests/node.pp', line 29
define zookeeperd::node(
Integer $nodeid,
String $nodename,
Enum['present', 'absent'] $ensure = 'present',
String $cfgtgt = $zookeeperd::cfg_path,
Optional[String] $ensamble = undef,
Integer $leaderport = 2888,
Integer $electionport = 3888,
) {
if !defined(Concat::Fragment["zoo.cfg node entry for ${nodename}"]) and $ensure == 'present' {
concat::fragment { "zoo.cfg node entry for ${nodename}":
target => $cfgtgt,
content => "server.${nodeid}=${nodename}:${leaderport}:${electionport}",
order => 10,
}
}
}
|