diff options
author | Aaron Smith <aasmith@redhat.com> | 2017-11-27 19:49:21 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-11-27 19:49:21 +0000 |
commit | 016ec072effd1638b52179eb056fda2891bd3777 (patch) | |
tree | ac331534786695b38cfb43ef907303af57a701e6 /puppet-barometer/manifests/db/sync.pp | |
parent | 8abbbfb5965b857c620de3737ba02cb4a6b7f62f (diff) | |
parent | cea670d32822b35502898c46a5a4b20b7363d46d (diff) |
Merge "puppet-barometer: add puppet module to barometer"
Diffstat (limited to 'puppet-barometer/manifests/db/sync.pp')
-rw-r--r-- | puppet-barometer/manifests/db/sync.pp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/puppet-barometer/manifests/db/sync.pp b/puppet-barometer/manifests/db/sync.pp new file mode 100644 index 00000000..6a67bf2f --- /dev/null +++ b/puppet-barometer/manifests/db/sync.pp @@ -0,0 +1,26 @@ +# +# Class to execute barometer-manage db_sync +# +# == Parameters +# +# [*extra_params*] +# (optional) String of extra command line parameters to append +# to the barometer-dbsync command. +# Defaults to undef +# +class barometer::db::sync( + $extra_params = undef, +) { + exec { 'barometer-db-sync': + command => "barometer-manage db_sync ${extra_params}", + path => [ '/bin', '/usr/bin', ], + user => 'barometer', + refreshonly => true, + try_sleep => 5, + tries => 10, + logoutput => on_failure, + subscribe => [Package['barometer'], Barometer_config['database/connection']], + } + + Exec['barometer-manage db_sync'] ~> Service<| title == 'barometer' |> +} |