Merge "puppet-barometer: add puppet module to barometer"
[barometer.git] / puppet-barometer / manifests / db / sync.pp
1 #
2 # Class to execute barometer-manage db_sync
3 #
4 # == Parameters
5 #
6 # [*extra_params*]
7 #   (optional) String of extra command line parameters to append
8 #   to the barometer-dbsync command.
9 #   Defaults to undef
10 #
11 class barometer::db::sync(
12   $extra_params  = undef,
13 ) {
14   exec { 'barometer-db-sync':
15     command     => "barometer-manage db_sync ${extra_params}",
16     path        => [ '/bin', '/usr/bin', ],
17     user        => 'barometer',
18     refreshonly => true,
19     try_sleep   => 5,
20     tries       => 10,
21     logoutput   => on_failure,
22     subscribe   => [Package['barometer'], Barometer_config['database/connection']],
23   }
24
25   Exec['barometer-manage db_sync'] ~> Service<| title == 'barometer' |>
26 }