File: deps.pp

package info (click to toggle)
puppet-module-gnocchi 25.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,096 kB
  • sloc: ruby: 2,339; python: 38; makefile: 10; sh: 10
file content (46 lines) | stat: -rw-r--r-- 1,754 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
42
43
44
45
46
# == Class: gnocchi::deps
#
#  Gnocchi anchors and dependency management
#
class gnocchi::deps {
  # Setup anchors for install, config and service phases of the module.  These
  # anchors allow external modules to hook the begin and end of any of these
  # phases.  Package or service management can also be replaced by ensuring the
  # package is absent or turning off service management and having the
  # replacement depend on the appropriate anchors.  When applicable, end tags
  # should be notified so that subscribers can determine if installation,
  # config or service state changed and act on that if needed.
  anchor { 'gnocchi::install::begin': }
  -> Package<| tag == 'gnocchi-package'|>
  ~> anchor { 'gnocchi::install::end': }
  -> anchor { 'gnocchi::config::begin': }
  -> Gnocchi_config<||>
  ~> anchor { 'gnocchi::config::end': }
  -> anchor { 'gnocchi::db::begin': }
  -> anchor { 'gnocchi::db::end': }
  ~> anchor { 'gnocchi::dbsync::begin': }
  -> anchor { 'gnocchi::dbsync::end': }
  ~> anchor { 'gnocchi::service::begin': }
  ~> Service<| tag == 'gnocchi-service' |>
  ~> anchor { 'gnocchi::service::end': }

  Anchor['gnocchi::config::begin']
  -> Gnocchi_api_paste_ini<||>
  -> Anchor['gnocchi::config::end']

  Anchor['gnocchi::config::begin']
  -> Gnocchi_api_uwsgi_config<||>
  -> Anchor['gnocchi::config::end']

  Anchor['gnocchi::config::begin']
  -> Gnocchi_api_config<||>
  ~> Anchor['gnocchi::config::end']

  Anchor['gnocchi::config::begin']
  -> Gnocchi_metricd_config<||>
  ~> Anchor['gnocchi::config::end']

  # Installation or config changes will always restart services.
  Anchor['gnocchi::install::end'] ~> Anchor['gnocchi::service::begin']
  Anchor['gnocchi::config::end']  ~> Anchor['gnocchi::service::begin']
}