Moved keystone db sync to its own class
This will decouple allowing for additions, like the apache wsgi patch, so it can be included or triggered elsewhere. Original author is François Charlier<francois.charlier@enovance.com> Change-Id: I9ae544d58034ca30ddb0a4c616ff794ccd432d7f
This commit is contained in:
12
manifests/db/sync.pp
Normal file
12
manifests/db/sync.pp
Normal file
@@ -0,0 +1,12 @@
|
||||
#
|
||||
# Class to execute "keystone-manage db_sync
|
||||
#
|
||||
class keystone::db::sync {
|
||||
exec { 'keystone-manage db_sync':
|
||||
path => '/usr/bin',
|
||||
user => 'keystone',
|
||||
refreshonly => true,
|
||||
subscribe => [Package['keystone'], Keystone_config['sql/connection']],
|
||||
require => User['keystone'],
|
||||
}
|
||||
}
|
||||
@@ -205,16 +205,8 @@ class keystone(
|
||||
}
|
||||
|
||||
if $enabled {
|
||||
# this probably needs to happen more often than just when the db is
|
||||
# created
|
||||
exec { 'keystone-manage db_sync':
|
||||
path => '/usr/bin',
|
||||
user => 'keystone',
|
||||
refreshonly => true,
|
||||
notify => Service['keystone'],
|
||||
subscribe => Package['keystone'],
|
||||
require => User['keystone'],
|
||||
}
|
||||
include keystone::db::sync
|
||||
Class['keystone::db::sync'] ~> Service['keystone']
|
||||
}
|
||||
|
||||
# Syslog configuration
|
||||
|
||||
@@ -94,8 +94,7 @@ describe 'keystone' do
|
||||
should contain_exec('keystone-manage db_sync').with(
|
||||
:user => 'keystone',
|
||||
:refreshonly => true,
|
||||
:notify => 'Service[keystone]',
|
||||
:subscribe => 'Package[keystone]',
|
||||
:subscribe => ['Package[keystone]', 'Keystone_config[sql/connection]'],
|
||||
:require => 'User[keystone]'
|
||||
)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user