Avoid hard-coding OS user/group in each manifest

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

Change-Id: I2b580431b26d93b2be42a17a59fd2e12498d5b70
This commit is contained in:
Takashi Kajinami 2022-02-20 19:36:39 +09:00
parent 872f9ab0d6
commit c904cbc94c
3 changed files with 6 additions and 5 deletions

View File

@ -3,7 +3,7 @@
# #
# [*user*] # [*user*]
# (Optional) User to run dbsync command. # (Optional) User to run dbsync command.
# Defaults to 'gnocchi' # Defaults to $::gnocchi::params::user
# #
# [*extra_opts*] # [*extra_opts*]
# (Optional) String of extra command line parameters to append # (Optional) String of extra command line parameters to append
@ -15,10 +15,10 @@
# Defaults to 300 # Defaults to 300
# #
class gnocchi::db::sync ( class gnocchi::db::sync (
$user = 'gnocchi', $user = $::gnocchi::params::user,
$extra_opts = undef, $extra_opts = undef,
$db_sync_timeout = 300, $db_sync_timeout = 300,
){ ) inherits gnocchi::params {
include gnocchi::deps include gnocchi::deps

View File

@ -14,6 +14,7 @@ class gnocchi::params {
$metricd_service_name = 'gnocchi-metricd' $metricd_service_name = 'gnocchi-metricd'
$statsd_package_name = 'gnocchi-statsd' $statsd_package_name = 'gnocchi-statsd'
$statsd_service_name = 'gnocchi-statsd' $statsd_service_name = 'gnocchi-statsd'
$user = 'gnocchi'
$group = 'gnocchi' $group = 'gnocchi'
$gnocchi_wsgi_script_source = '/usr/bin/gnocchi-api' $gnocchi_wsgi_script_source = '/usr/bin/gnocchi-api'
$boto3_package_name = 'python3-boto3' $boto3_package_name = 'python3-boto3'

View File

@ -142,7 +142,7 @@ class gnocchi::wsgi::apache (
::openstacklib::wsgi::apache { 'gnocchi_wsgi': ::openstacklib::wsgi::apache { 'gnocchi_wsgi':
bind_host => $bind_host, bind_host => $bind_host,
bind_port => $port, bind_port => $port,
group => 'gnocchi', group => $::gnocchi::params::group,
path => $path, path => $path,
priority => $priority, priority => $priority,
servername => $servername, servername => $servername,
@ -155,7 +155,7 @@ class gnocchi::wsgi::apache (
ssl_crl_path => $ssl_crl_path, ssl_crl_path => $ssl_crl_path,
ssl_key => $ssl_key, ssl_key => $ssl_key,
threads => $threads, threads => $threads,
user => 'gnocchi', user => $::gnocchi::params::user,
vhost_custom_fragment => $vhost_custom_fragment, vhost_custom_fragment => $vhost_custom_fragment,
workers => $workers, workers => $workers,
wsgi_daemon_process => 'gnocchi', wsgi_daemon_process => 'gnocchi',