File: coordination.pp

package info (click to toggle)
puppet-module-designate 25.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,544 kB
  • sloc: ruby: 3,196; python: 38; sh: 10; makefile: 10
file content (41 lines) | stat: -rw-r--r-- 1,226 bytes parent folder | download
1
2
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
31
32
33
34
35
36
37
38
39
40
41
# == Class: designate::coordination
#
# Setup and configure Designate coordination settings.
#
# === Parameters
#
# [*backend_url*]
#   (Optional) Coordination backend URL.
#   Defaults to $facts['os_service_default']
#
# [*heartbeat_interval*]
#   (Optional) Number of seconds between heartbeats for distributed
#   coordination.
#   Defaults to $facts['os_service_default']
#
# [*run_watchers_interval*]
#   (Optional) Number of seconds between checks to see if group membership
#   has changed.
#   Defaults to $facts['os_service_default']
#
class designate::coordination (
  $backend_url           = $facts['os_service_default'],
  $heartbeat_interval    = $facts['os_service_default'],
  $run_watchers_interval = $facts['os_service_default'],
) {

  include designate::deps

  oslo::coordination{ 'designate_config':
    backend_url => $backend_url
  }

  designate_config {
    'coordination/heartbeat_interval':    value => $heartbeat_interval;
    'coordination/run_watchers_interval': value => $run_watchers_interval;
  }

  # all coordination settings should be applied and all packages should be
  # installed before service startup
  Oslo::Coordination['designate_config'] -> Anchor['designate::service::begin']
}