Tobias Urdin 2e5b0dd098 Add per module policy service refresh
Updating the policies for this project should only
refresh the services that reads it.

Change-Id: I9c4804116384465fbefa419c1158a87ab8b2c872
(cherry picked from commit df8733d486a9c87ad5e8103c45d5b7011e41935e)
(cherry picked from commit d661961d356f6cb13a219275ee971380c21951e0)
(cherry picked from commit 6e9ba1e0d74b870de0643d200144ae84a1e95a0d)
2023-07-31 11:36:47 +00:00

43 lines
1.5 KiB
Puppet

# == Class: watcher::deps
#
# watcher anchors and dependency management
#
class watcher::deps {
anchor { 'watcher::install::begin': }
-> Package<| tag == 'watcher-package'|>
~> anchor { 'watcher::install::end': }
-> anchor { 'watcher::config::begin': }
-> Watcher_config<||>
~> anchor { 'watcher::config::end': }
~> anchor { 'watcher::db::begin': }
~> anchor { 'watcher::db::end': }
~> anchor { 'watcher::db::create_schema::begin': }
~> anchor { 'watcher::db::create_schema::end': }
~> anchor { 'watcher::db::upgrade::begin': }
~> anchor { 'watcher::db::upgrade::end': }
~> anchor { 'watcher::service::begin': }
~> Service<| tag == 'watcher-service' |>
~> anchor { 'watcher::service::end': }
# policy config should occur in the config block also.
Anchor['watcher::config::begin']
-> Openstacklib::Policy<| tag == 'watcher' |>
~> Anchor['watcher::config::end']
# all cache settings should be applied and all packages should be installed
# before service startup
Oslo::Cache<||> -> Anchor['watcher::service::begin']
# all db settings should be applied and all packages should be installed
# before dbsync starts
Oslo::Db<||> -> Anchor['watcher::db::create_schema::begin']
Anchor['watcher::install::end'] ~> Anchor['watcher::service::begin']
Anchor['watcher::config::end'] ~> Anchor['watcher::service::begin']
anchor { 'watcher-start':
require => Anchor['watcher::install::end'],
before => Anchor['watcher::config::begin'],
}
}