Puppet Class: galera::arbitrator

Defined in:
manifests/arbitrator.pp

Summary

Installs and configures the Arbitrator service.

Overview

Parameters:

  • config_file (String)
  • package_name (String)
  • service_name (String)


3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'manifests/arbitrator.pp', line 3

class galera::arbitrator (
  # NOTE: These parameters are evaluated in the main galera class and
  #       MUST ONLY be set using the parameters of the main class.
  String $config_file,
  String $package_name,
  String $service_name,
) {
  stdlib::ensure_packages([$package_name], { ensure => $galera::arbitrator_package_ensure })

  file { 'arbitrator-config-file':
    path    => $config_file,
    mode    => '0640',
    owner   => 'root',
    group   => 'nobody',
    content => epp($galera::arbitrator_template),
    require => [Package[$package_name]],
  }

  service { 'arbitrator-service':
    ensure    => 'running',
    name      => $service_name,
    enable    => $galera::arbitrator_service_enabled,
    subscribe => [
      Package[$package_name],
      File['arbitrator-config-file'],
    ],
  }
}