We want to get rid of User POSIX dependency, let's fix it here. Change-Id: Ic55b06b5bcaec5edd55faf190b2b2d326726d160
24 lines
823 B
Puppet
24 lines
823 B
Puppet
#
|
|
# Class to execute {{cookiecutter.project_name}}-manage db_sync
|
|
#
|
|
# == Parameters
|
|
#
|
|
# [*extra_params*]
|
|
# (optional) String of extra command line parameters to append
|
|
# to the {{cookiecutter.project_name}}-dbsync command.
|
|
# Defaults to undef
|
|
#
|
|
class {{cookiecutter.project_name}}::db::sync(
|
|
$extra_params = undef,
|
|
) {
|
|
exec { '{{cookiecutter.project_name}}-db-sync':
|
|
command => "{{cookiecutter.project_name}}-manage db_sync ${extra_params}",
|
|
path => '/usr/bin',
|
|
user => '{{cookiecutter.project_name}}',
|
|
refreshonly => true,
|
|
subscribe => [Package['{{cookiecutter.project_name}}'], {{cookiecutter.project_name|capitalize}}_config['database/connection']],
|
|
}
|
|
|
|
Exec['{{cookiecutter.project_name}}-manage db_sync'] ~> Service<| title == '{{cookiecutter.project_name}}' |>
|
|
}
|