puppet-aodh/manifests/db/sync.pp
ZhongShengping cb865e6e5b Add hooks for external install & svc management
This adds defined anchor points for external modules to hook into the
software install, config and service dependency chain.  This allows
external modules to manage software installation (virtualenv,
containers, etc) and service management (pacemaker) without needing rely
on resources that may change or be renamed.

Change-Id: Ibc184a50cf16b7048e0f7249f8894d8661bb76fe
2016-11-28 13:13:17 +08:00

31 lines
626 B
Puppet

#
# Class to execute "aodh-dbsync"
#
# [*user*]
# (optional) User to run dbsync command.
# Defaults to 'aodh'
#
class aodh::db::sync (
$user = 'aodh',
){
include ::aodh::deps
exec { 'aodh-db-sync':
command => 'aodh-dbsync --config-file /etc/aodh/aodh.conf',
path => '/usr/bin',
refreshonly => true,
user => $user,
try_sleep => 5,
tries => 10,
logoutput => on_failure,
subscribe => [
Anchor['aodh::install::end'],
Anchor['aodh::config::end'],
Anchor['aodh::dbsync::begin']
],
notify => Anchor['aodh::dbsync::end'],
}
}