2015-06-29 11:12:27 +00:00
|
|
|
#
|
|
|
|
# Class to execute glance dbsync
|
|
|
|
#
|
2015-11-02 22:04:35 +00:00
|
|
|
# == Parameters
|
|
|
|
#
|
|
|
|
# [*extra_params*]
|
|
|
|
# (optional) String of extra command line parameters to append
|
|
|
|
# to the glance-manage db sync command. These will be inserted
|
|
|
|
# in the command line between 'glance-manage' and 'db sync'.
|
2015-11-19 16:31:13 +00:00
|
|
|
# Defaults to '--config-file /etc/glance/glance-registry.conf'
|
2015-11-02 22:04:35 +00:00
|
|
|
#
|
|
|
|
class glance::db::sync(
|
2015-11-19 16:31:13 +00:00
|
|
|
$extra_params = '--config-file /etc/glance/glance-registry.conf',
|
2015-11-02 22:04:35 +00:00
|
|
|
) {
|
2015-06-29 11:12:27 +00:00
|
|
|
|
|
|
|
include ::glance::params
|
|
|
|
|
|
|
|
Package<| tag == 'glance-package' |> ~> Exec['glance-manage db_sync']
|
|
|
|
Exec['glance-manage db_sync'] ~> Service<| tag == 'glance-service' |>
|
|
|
|
|
|
|
|
Glance_registry_config<||> ~> Exec['glance-manage db_sync']
|
|
|
|
Glance_api_config<||> ~> Exec['glance-manage db_sync']
|
|
|
|
Glance_cache_config<||> ~> Exec['glance-manage db_sync']
|
|
|
|
|
|
|
|
exec { 'glance-manage db_sync':
|
2015-11-02 22:04:35 +00:00
|
|
|
command => "glance-manage ${extra_params} db_sync",
|
2015-06-29 11:12:27 +00:00
|
|
|
path => '/usr/bin',
|
|
|
|
user => 'glance',
|
|
|
|
refreshonly => true,
|
|
|
|
logoutput => on_failure,
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|