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:
Takashi Kajinami 2023-03-30 14:48:18 +09:00
parent 61b4cf5e96
commit 4db94d41bd
2 changed files with 3 additions and 1 deletions

View File

@ -18,11 +18,12 @@ class {{cookiecutter.project_name}}::db::sync(
) {
include {{cookiecutter.project_name}}::deps
include {{cookiecutter.project_name}}::params
exec { '{{cookiecutter.project_name}}-db-sync':
command => "{{cookiecutter.project_name}}-manage db_sync ${extra_params}",
path => ['/bin', '/usr/bin'],
user => '{{cookiecutter.project_name}}',
user => $::{{cookiecutter.project_name}}::params::user,
refreshonly => true,
try_sleep => 5,
tries => 10,

View File

@ -7,6 +7,7 @@ class {{cookiecutter.project_name}}::params {
include {{cookiecutter.project_name}}::deps
include openstacklib::defaults
$user = '{{cookiecutter.project_name}}'
$group = '{{cookiecutter.project_name}}'
case $facts['os']['family'] {