Avoid hard-coding OS user/group in each manifest

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

Change-Id: I7f9267eef43a08f7cca12f1062ab532d96f1075f
This commit is contained in:
Takashi Kajinami 2022-02-21 01:16:08 +09:00
parent 9664dbf907
commit 46b552b1dc
6 changed files with 7 additions and 6 deletions

View File

@ -28,6 +28,7 @@ class neutron::params {
$nsx_plugin_package = 'vmware-nsx'
$nsx_config_file = '/etc/neutron/plugins/vmware/nsx.ini'
$sfc_package = 'python3-networking-sfc'
$user = 'neutron'
$group = 'neutron'
$mlnx_agent_package = 'python3-networking-mlnx'
$eswitchd_service = 'eswitchd'

View File

@ -84,7 +84,7 @@ class neutron::plugins::ml2::nuage (
file { '/etc/neutron/plugins/nuage/plugin.ini':
ensure => file,
owner => 'root',
group => 'neutron',
group => $::neutron::params::group,
require => File['/etc/neutron/plugins/nuage'],
mode => '0640',
tag => 'neutron-config-file',

View File

@ -98,7 +98,7 @@ class neutron::plugins::nsx (
file { $::neutron::params::nsx_config_file:
ensure => file,
owner => 'root',
group => 'neutron',
group => $::neutron::params::group,
require => File['/etc/neutron/plugins/vmware'],
mode => '0640',
tag => 'neutron-config-file',

View File

@ -81,7 +81,7 @@ class neutron::plugins::nuage (
file { '/etc/neutron/plugins/nuage/plugin.ini':
ensure => file,
owner => 'root',
group => 'neutron',
group => $::neutron::params::group,
require => File['/etc/neutron/plugins/nuage'],
mode => '0640',
tag => 'neutron-config-file',

View File

@ -80,7 +80,7 @@ class neutron::plugins::opencontrail (
ensure_resource('file', '/etc/neutron/plugins/opencontrail', {
ensure => directory,
owner => 'root',
group => 'neutron',
group => $::neutron::params::group,
mode => '0640'}
)

View File

@ -134,7 +134,7 @@ class neutron::wsgi::apache (
::openstacklib::wsgi::apache { 'neutron_wsgi':
bind_host => $bind_host,
bind_port => $port,
group => 'neutron',
group => $::neutron::params::group,
path => $path,
priority => $priority,
servername => $servername,
@ -147,7 +147,7 @@ class neutron::wsgi::apache (
ssl_crl_path => $ssl_crl_path,
ssl_key => $ssl_key,
threads => $threads,
user => 'neutron',
user => $::neutron::params::user,
workers => $workers,
wsgi_daemon_process => 'neutron',
wsgi_process_display_name => $wsgi_process_display_name,