Avoid hard-coding OS user/group in each manifest

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

Change-Id: I3d419faaa33935476b705a58dac949fb7ae97eba
This commit is contained in:
Takashi Kajinami
2022-02-21 01:49:40 +09:00
parent b8a6c785e9
commit 1eaa37a0c7
4 changed files with 7 additions and 4 deletions

View File

@@ -13,11 +13,12 @@ class watcher::db::create_schema(
) {
include watcher::deps
include watcher::params
exec { 'watcher-db-manage-create_schema':
command => "watcher-db-manage ${extra_params} create_schema",
path => '/usr/bin',
user => 'watcher',
user => $::watcher::params::user,
refreshonly => true,
try_sleep => 5,
tries => 10,

View File

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

View File

@@ -4,6 +4,7 @@ class watcher::params {
include openstacklib::defaults
$client_package_name = 'python3-watcherclient'
$user = 'watcher'
$group = 'watcher'
case $::osfamily {

View File

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