Avoid hard-coding OS user in each manifests
... but define it ::params as is done for group. Change-Id: If343a8d89c7675a969e0a16ad9903cd4051ce750
This commit is contained in:
parent
61b4cf5e96
commit
4db94d41bd
|
@ -18,11 +18,12 @@ class {{cookiecutter.project_name}}::db::sync(
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include {{cookiecutter.project_name}}::deps
|
include {{cookiecutter.project_name}}::deps
|
||||||
|
include {{cookiecutter.project_name}}::params
|
||||||
|
|
||||||
exec { '{{cookiecutter.project_name}}-db-sync':
|
exec { '{{cookiecutter.project_name}}-db-sync':
|
||||||
command => "{{cookiecutter.project_name}}-manage db_sync ${extra_params}",
|
command => "{{cookiecutter.project_name}}-manage db_sync ${extra_params}",
|
||||||
path => ['/bin', '/usr/bin'],
|
path => ['/bin', '/usr/bin'],
|
||||||
user => '{{cookiecutter.project_name}}',
|
user => $::{{cookiecutter.project_name}}::params::user,
|
||||||
refreshonly => true,
|
refreshonly => true,
|
||||||
try_sleep => 5,
|
try_sleep => 5,
|
||||||
tries => 10,
|
tries => 10,
|
||||||
|
|
|
@ -7,6 +7,7 @@ class {{cookiecutter.project_name}}::params {
|
||||||
include {{cookiecutter.project_name}}::deps
|
include {{cookiecutter.project_name}}::deps
|
||||||
include openstacklib::defaults
|
include openstacklib::defaults
|
||||||
|
|
||||||
|
$user = '{{cookiecutter.project_name}}'
|
||||||
$group = '{{cookiecutter.project_name}}'
|
$group = '{{cookiecutter.project_name}}'
|
||||||
|
|
||||||
case $facts['os']['family'] {
|
case $facts['os']['family'] {
|
||||||
|
|
Loading…
Reference in New Issue