Avoid hard-coding OS user/group in each manifest

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

Change-Id: If9995d8e01f06e0e200e348200f231d72ee351ec
This commit is contained in:
Takashi Kajinami 2022-02-21 01:11:38 +09:00
parent 91171b8a89
commit 28161d4d7d
3 changed files with 5 additions and 4 deletions

View File

@ -17,7 +17,7 @@ class mistral::db::sync(
exec { 'mistral-db-sync':
command => $::mistral::params::db_sync_command,
path => '/usr/bin',
user => 'mistral',
user => $::mistral::params::user,
logoutput => on_failure,
refreshonly => true,
try_sleep => 5,
@ -36,7 +36,7 @@ class mistral::db::sync(
require => Exec['mistral-db-sync'],
command => $::mistral::params::db_populate_command,
path => '/usr/bin',
user => 'mistral',
user => $::mistral::params::user,
timeout => $db_sync_timeout,
logoutput => on_failure,
refreshonly => true,

View File

@ -8,6 +8,7 @@ class mistral::params {
$client_package = 'python3-mistralclient'
$db_sync_command = 'mistral-db-manage --config-file=/etc/mistral/mistral.conf upgrade head'
$db_populate_command = 'mistral-db-manage --config-file=/etc/mistral/mistral.conf populate'
$user = 'mistral'
$group = 'mistral'
case $::osfamily {

View File

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