File: deps.pp

package info (click to toggle)
puppet-module-octavia 25.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,588 kB
  • sloc: ruby: 3,940; python: 38; makefile: 12; sh: 10
file content (40 lines) | stat: -rw-r--r-- 1,720 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
# == Class: octavia::deps
#
#  Octavia anchors and dependency management
#
class octavia::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 { 'octavia::install::begin': }
  -> Package<| tag == 'octavia-package'|>
  ~> anchor { 'octavia::install::end': }
  -> anchor { 'octavia::config::begin': }
  -> Octavia_config<||>
  ~> anchor { 'octavia::config::end': }
  -> anchor { 'octavia::certificate::begin': }
  -> File<| tag == 'octavia-certificate' |>
  ~> anchor { 'octavia::certificate::end': }
  -> anchor { 'octavia::db::begin': }
  -> anchor { 'octavia::db::end': }
  ~> anchor { 'octavia::dbsync::begin': }
  -> anchor { 'octavia::dbsync::end': }
  ~> anchor { 'octavia::service::begin': }
  ~> Service<| tag == 'octavia-service' |>
  ~> anchor { 'octavia::service::end': }

  Anchor['octavia::config::begin']
  -> Octavia_api_uwsgi_config<||>
  -> Anchor['octavia::config::end']

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

  # Changes in certificate or folders will restart services.
  Anchor['octavia::certificate::end'] ~> Anchor['octavia::service::begin']
}