
This refactors resource dependencies to avoid unnecessary dependencies across services. For example zaqar service does not require cinder db. Change-Id: I8b2c64ab4896c6fbb407eaa58e99056da3b5170c
31 lines
707 B
Puppet
31 lines
707 B
Puppet
# == class: zaqar::management::sqlalchemy
|
|
#
|
|
# [*uri*]
|
|
# SQLAlchemy Connection URI. Required.
|
|
#
|
|
# [*package_ensure*]
|
|
# (Optional) Ensure state for package.
|
|
# Defaults to present.
|
|
#
|
|
class zaqar::management::sqlalchemy(
|
|
$uri,
|
|
$package_ensure = 'present',
|
|
) {
|
|
|
|
include zaqar::deps
|
|
|
|
zaqar_config {
|
|
'drivers:management_store:sqlalchemy/uri': value => $uri, secret => true;
|
|
}
|
|
|
|
oslo::db { 'zaqar_config':
|
|
connection => $uri,
|
|
backend_package_ensure => $package_ensure,
|
|
manage_config => false,
|
|
}
|
|
|
|
# all db settings should be applied and all packages should be installed
|
|
# before dbsync starts
|
|
Oslo::Db['zaqar_config'] -> Anchor['zaqar::dbsync::begin']
|
|
}
|