From 7fd91ee833764414b61ab306af0496cae1079ac6 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sun, 20 Oct 2024 03:37:03 +0900 Subject: [PATCH] Centralize user/group definition Define user and group in params and user the common definitions in all places, following the other modules. Change-Id: If4cf27dbf6e3809b1341ee7325ae0118225f2cb2 --- manifests/db/sync.pp | 3 ++- manifests/params.pp | 1 + manifests/wsgi/apache.pp | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/manifests/db/sync.pp b/manifests/db/sync.pp index f7b839e..1f2d145 100644 --- a/manifests/db/sync.pp +++ b/manifests/db/sync.pp @@ -12,11 +12,12 @@ class placement::db::sync( ) { include placement::deps + include placement::params exec { 'placement-manage-db-sync': command => 'placement-manage db sync', path => ['/bin', '/usr/bin', '/usr/local/bin'], - user => 'placement', + user => $::placement::params::user, refreshonly => true, try_sleep => 5, tries => 10, diff --git a/manifests/params.pp b/manifests/params.pp index 31bde7e..558d1ef 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -5,6 +5,7 @@ class placement::params { include placement::deps include openstacklib::defaults + $user = 'placement' $group = 'placement' case $facts['os']['family'] { diff --git a/manifests/wsgi/apache.pp b/manifests/wsgi/apache.pp index 4cb2e6d..7b9e9c0 100644 --- a/manifests/wsgi/apache.pp +++ b/manifests/wsgi/apache.pp @@ -167,7 +167,7 @@ class placement::wsgi::apache ( ::openstacklib::wsgi::apache { 'placement_wsgi': bind_host => $bind_host, bind_port => $port, - group => 'placement', + group => $::placement::params::group, path => $path, priority => $priority, servername => $servername, @@ -180,7 +180,7 @@ class placement::wsgi::apache ( ssl_crl_path => $ssl_crl_path, ssl_key => $ssl_key, threads => $threads, - user => 'placement', + user => $::placement::params::user, vhost_custom_fragment => $vhost_custom_fragment, workers => $workers, wsgi_daemon_process => 'placement-api',