puppet-congress/manifests/db/sync.pp
ZhongShengping be770957ad Add 'openstack-db' tag to db-sync Exec resource
In order to make easy orchestration on all OpenStack db-sync, add this
tag so people can use this tag in composition layer.
A use case it to set some orchestration to make sure MySQL Galera is
ready before running any Exec with this tag.

Change-Id: I901de48e1a8644499a7ab60c7d632cf17eee7e20
Closes-Bug: #1755102
2018-03-12 16:33:06 +08:00

34 lines
765 B
Puppet

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