File: deps.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 (38 lines) | stat: -rw-r--r-- 1,602 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
# == Class: designate::deps
#
#  Designate anchors and dependency management
#
class designate::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 { 'designate::install::begin': }
  -> Package<| tag == 'designate-package'|>
  ~> anchor { 'designate::install::end': }
  -> anchor { 'designate::config::begin': }
  -> Designate_config<||>
  ~> anchor { 'designate::config::end': }
  -> anchor { 'designate::db::begin': }
  -> anchor { 'designate::db::end': }
  ~> anchor { 'designate::dbsync::begin': }
  -> anchor { 'designate::dbsync::end': }
  ~> anchor { 'designate::service::begin': }
  ~> Service<| tag == 'designate-service' |>
  ~> anchor { 'designate::service::end': }

  Anchor['designate::config::begin']
  -> Designate_api_paste_ini<||>
  -> Anchor['designate::config::end']

  Anchor['designate::config::begin']
  -> Designate_api_uwsgi_config<||>
  -> Anchor['designate::config::end']

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