Avoid hard-coding OS user/group in each manifest

and replace hard-codes by definition in params.pp .

Change-Id: If76bc4202133742fe47140238d065a080d5a4a66
This commit is contained in:
Takashi Kajinami 2022-02-20 19:11:43 +09:00
parent af68446b62
commit 4828d650b3
3 changed files with 5 additions and 3 deletions

View File

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

View File

@ -8,6 +8,7 @@ class cloudkitty::params {
$client_package_name = 'python3-cloudkittyclient'
$api_service_name = 'cloudkitty-api'
$processor_service_name = 'cloudkitty-processor'
$user = 'cloudkitty'
$group = 'cloudkitty'
$metrics_yaml = '/etc/cloudkitty/metrics.yml'

View File

@ -132,7 +132,7 @@ class cloudkitty::wsgi::apache (
::openstacklib::wsgi::apache { 'cloudkitty_wsgi':
bind_host => $bind_host,
bind_port => $port,
group => 'cloudkitty',
group => $::cloudkitty::params::group,
path => $path,
priority => $priority,
servername => $servername,
@ -145,7 +145,7 @@ class cloudkitty::wsgi::apache (
ssl_crl_path => $ssl_crl_path,
ssl_key => $ssl_key,
threads => $threads,
user => 'cloudkitty',
user => $::cloudkitty::params::user,
workers => $workers,
wsgi_daemon_process => 'cloudkitty',
wsgi_process_display_name => $wsgi_process_display_name,