Avoid hard-coding OS user/group in each manifest

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

Change-Id: Ie9c96fed2e902722067cf41398d49959059a0721
This commit is contained in:
Takashi Kajinami 2022-02-20 19:01:46 +09:00
parent 15773d1be0
commit 6675988bbb
4 changed files with 7 additions and 6 deletions

View File

@ -3,16 +3,16 @@
# #
# [*user*] # [*user*]
# (Optional) User to run dbsync command. # (Optional) User to run dbsync command.
# Defaults to 'aodh' # Defaults to $::aodh::params::user
# #
# [*db_sync_timeout*] # [*db_sync_timeout*]
# (Optional) Timeout for the execution of the db_sync # (Optional) Timeout for the execution of the db_sync
# Defaults to 300 # Defaults to 300
# #
class aodh::db::sync ( class aodh::db::sync (
$user = 'aodh', $user = $::aodh::params::user,
$db_sync_timeout = 300, $db_sync_timeout = 300,
){ ) inherits aodh::params {
include aodh::deps include aodh::deps

View File

@ -73,7 +73,7 @@ class aodh::expirer (
ensure => $ensure, ensure => $ensure,
command => "${sleep}${aodh::params::expirer_command}", command => "${sleep}${aodh::params::expirer_command}",
environment => 'PATH=/bin:/usr/bin:/usr/sbin SHELL=/bin/sh', environment => 'PATH=/bin:/usr/bin:/usr/sbin SHELL=/bin/sh',
user => 'aodh', user => $::aodh::params::user,
minute => $minute, minute => $minute,
hour => $hour, hour => $hour,
monthday => $monthday, monthday => $monthday,

View File

@ -4,6 +4,7 @@ class aodh::params {
include openstacklib::defaults include openstacklib::defaults
$client_package_name = 'python3-aodhclient' $client_package_name = 'python3-aodhclient'
$user = 'aodh'
$group = 'aodh' $group = 'aodh'
$expirer_command = 'aodh-expirer' $expirer_command = 'aodh-expirer'

View File

@ -167,7 +167,7 @@ Use $::aodh::params::aodh_wsgi_script_source instead')
openstacklib::wsgi::apache { 'aodh_wsgi': openstacklib::wsgi::apache { 'aodh_wsgi':
bind_host => $bind_host, bind_host => $bind_host,
bind_port => $port, bind_port => $port,
group => 'aodh', group => $::aodh::params::group,
path => $path, path => $path,
priority => $priority, priority => $priority,
servername => $servername, servername => $servername,
@ -180,7 +180,7 @@ Use $::aodh::params::aodh_wsgi_script_source instead')
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 => 'aodh', user => $::aodh::params::user,
vhost_custom_fragment => $vhost_custom_fragment, vhost_custom_fragment => $vhost_custom_fragment,
workers => $workers, workers => $workers,
wsgi_daemon_process => 'aodh', wsgi_daemon_process => 'aodh',