Prepare for new lint plugins

This fixes a few lint warnings/errors detected by the following plugins
we aim to enable soon.
 - puppet-lint-file_ensure-check
 - puppet-lint-trailing_comma-check
 - puppet-lint-topscope-variable-check

Change-Id: I2abb0504d2c8292c529fe30b3738174fdd5ef397
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2025-08-15 20:05:16 +09:00
parent b04391f81b
commit a2ab38e382
10 changed files with 49 additions and 49 deletions

View File

@@ -12,7 +12,7 @@ class { 'trove::keystone::auth':
class { 'trove::db::mysql':
password => 'dbpass',
host => 'localhost',
allowed_hosts => ['localhost']
allowed_hosts => ['localhost'],
}
class { 'trove::db':

View File

@@ -32,7 +32,7 @@
# service, and you must use another class to configure that
# web service. For example, use class { 'trove::wsgi::apache'...}
# to make trove-api be a web app using apache mod_wsgi.
# Defaults to '$::trove::params::api_service'
# Defaults to '$trove::params::api_service'
#
# [*package_ensure*]
# (optional) Whether the trove api package will be installed
@@ -105,7 +105,7 @@
#
class trove::api(
Boolean $manage_service = true,
$service_name = $::trove::params::api_service_name,
$service_name = $trove::params::api_service_name,
$package_ensure = 'present',
$bind_host = $facts['os_service_default'],
$bind_port = $facts['os_service_default'],
@@ -164,12 +164,12 @@ class trove::api(
'DEFAULT/taskmanager_queue': value => $taskmanager_queue;
}
if $service_name == $::trove::params::api_service_name {
if $service_name == $trove::params::api_service_name {
trove::generic_service { 'api':
enabled => $enabled,
manage_service => $manage_service,
package_ensure => $package_ensure,
package_name => $::trove::params::api_package_name,
package_name => $trove::params::api_package_name,
service_name => $service_name,
}
if $manage_service {
@@ -180,8 +180,8 @@ class trove::api(
enabled => false,
manage_service => $manage_service,
package_ensure => $package_ensure,
package_name => $::trove::params::api_package_name,
service_name => $::trove::params::api_service_name,
package_name => $trove::params::api_package_name,
service_name => $trove::params::api_service_name,
}
if $manage_service {
Service<| title == 'httpd' |> { tag +> 'trove-service' }

View File

@@ -59,8 +59,8 @@ class trove::conductor(
trove::generic_service { 'conductor':
enabled => $enabled,
manage_service => $manage_service,
package_name => $::trove::params::conductor_package_name,
service_name => $::trove::params::conductor_service_name,
package_name => $trove::params::conductor_package_name,
service_name => $trove::params::conductor_service_name,
package_ensure => $package_ensure,
}

View File

@@ -30,7 +30,7 @@ class trove::db::sync(
exec { 'trove-manage db_sync':
path => '/usr/bin',
user => $::trove::params::user,
user => $trove::params::user,
refreshonly => true,
try_sleep => 5,
tries => 10,

View File

@@ -55,7 +55,7 @@
# (optional) A URL representing the messaging driver to use and its full
# configuration. Transport URLs take the form:
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
# Defaults to $::trove::default_transport_url
# Defaults to $trove::default_transport_url
#
# [*rabbit_use_ssl*]
# (optional) Connect over SSL for RabbitMQ
@@ -126,8 +126,8 @@ class trove::guestagent(
$swift_url = $facts['os_service_default'],
$swift_service_type = $facts['os_service_default'],
$swift_endpoint_type = $facts['os_service_default'],
$default_transport_url = $::trove::default_transport_url,
$rabbit_use_ssl = $::trove::rabbit_use_ssl,
$default_transport_url = $trove::default_transport_url,
$rabbit_use_ssl = $trove::rabbit_use_ssl,
$root_grant = $facts['os_service_default'],
$root_grant_option = $facts['os_service_default'],
$container_registry = $facts['os_service_default'],
@@ -164,32 +164,32 @@ class trove::guestagent(
oslo::messaging::default { 'trove_guestagent_config':
transport_url => $default_transport_url,
control_exchange => $::trove::control_exchange,
rpc_response_timeout => $::trove::rpc_response_timeout,
control_exchange => $trove::control_exchange,
rpc_response_timeout => $trove::rpc_response_timeout,
}
oslo::messaging::rabbit {'trove_guestagent_config':
rabbit_ha_queues => $::trove::rabbit_ha_queues,
heartbeat_timeout_threshold => $::trove::rabbit_heartbeat_timeout_threshold,
heartbeat_rate => $::trove::rabbit_heartbeat_rate,
heartbeat_in_pthread => $::trove::rabbit_heartbeat_in_pthread,
rabbit_qos_prefetch_count => $::trove::rabbit_qos_prefetch_count,
rabbit_ha_queues => $trove::rabbit_ha_queues,
heartbeat_timeout_threshold => $trove::rabbit_heartbeat_timeout_threshold,
heartbeat_rate => $trove::rabbit_heartbeat_rate,
heartbeat_in_pthread => $trove::rabbit_heartbeat_in_pthread,
rabbit_qos_prefetch_count => $trove::rabbit_qos_prefetch_count,
rabbit_use_ssl => $rabbit_use_ssl,
kombu_reconnect_delay => $::trove::kombu_reconnect_delay,
kombu_failover_strategy => $::trove::kombu_failover_strategy,
amqp_durable_queues => $::trove::amqp_durable_queues,
amqp_auto_delete => $::trove::amqp_auto_delete,
kombu_ssl_ca_certs => $::trove::kombu_ssl_ca_certs,
kombu_ssl_certfile => $::trove::kombu_ssl_certfile,
kombu_ssl_keyfile => $::trove::kombu_ssl_keyfile,
kombu_ssl_version => $::trove::kombu_ssl_version,
rabbit_quorum_queue => $::trove::rabbit_quorum_queue,
rabbit_transient_quorum_queue => $::trove::rabbit_transient_quorum_queue,
rabbit_transient_queues_ttl => $::trove::rabbit_transient_queues_ttl,
rabbit_quorum_delivery_limit => $::trove::rabbit_quorum_delivery_limit,
rabbit_quorum_max_memory_length => $::trove::rabbit_quorum_max_memory_length,
rabbit_quorum_max_memory_bytes => $::trove::rabbit_quorum_max_memory_bytes,
enable_cancel_on_failover => $::trove::rabbit_enable_cancel_on_failover,
kombu_reconnect_delay => $trove::kombu_reconnect_delay,
kombu_failover_strategy => $trove::kombu_failover_strategy,
amqp_durable_queues => $trove::amqp_durable_queues,
amqp_auto_delete => $trove::amqp_auto_delete,
kombu_ssl_ca_certs => $trove::kombu_ssl_ca_certs,
kombu_ssl_certfile => $trove::kombu_ssl_certfile,
kombu_ssl_keyfile => $trove::kombu_ssl_keyfile,
kombu_ssl_version => $trove::kombu_ssl_version,
rabbit_quorum_queue => $trove::rabbit_quorum_queue,
rabbit_transient_quorum_queue => $trove::rabbit_transient_quorum_queue,
rabbit_transient_queues_ttl => $trove::rabbit_transient_queues_ttl,
rabbit_quorum_delivery_limit => $trove::rabbit_quorum_delivery_limit,
rabbit_quorum_max_memory_length => $trove::rabbit_quorum_max_memory_length,
rabbit_quorum_max_memory_bytes => $trove::rabbit_quorum_max_memory_bytes,
enable_cancel_on_failover => $trove::rabbit_enable_cancel_on_failover,
}
oslo::log { 'trove_guestagent_config':
@@ -197,14 +197,14 @@ class trove::guestagent(
log_file => $log_file,
log_dir => $log_dir,
use_syslog => $use_syslog,
syslog_log_facility => $log_facility
syslog_log_facility => $log_facility,
}
trove::generic_service { 'guestagent':
enabled => $enabled,
manage_service => $manage_service,
package_name => $::trove::params::guestagent_package_name,
service_name => $::trove::params::guestagent_service_name,
package_name => $trove::params::guestagent_package_name,
service_name => $trove::params::guestagent_service_name,
package_ensure => $package_ensure,
}

View File

@@ -325,7 +325,7 @@ class trove(
package { 'trove':
ensure => $package_ensure,
name => $::trove::params::common_package_name,
name => $trove::params::common_package_name,
tag => ['openstack', 'trove-package'],
}

View File

@@ -141,6 +141,6 @@ class trove::logging(
fatal_deprecations => $fatal_deprecations,
instance_format => $instance_format,
instance_uuid_format => $instance_uuid_format,
log_date_format => $log_date_format
log_date_format => $log_date_format,
}
}

View File

@@ -62,7 +62,7 @@ class trove::policy (
policies => $policies,
policy_path => $policy_path,
file_user => 'root',
file_group => $::trove::params::group,
file_group => $trove::params::group,
file_format => 'yaml',
purge_config => $purge_config,
tag => 'trove',

View File

@@ -68,8 +68,8 @@ class trove::taskmanager(
trove::generic_service { 'taskmanager':
enabled => $enabled,
manage_service => $manage_service,
package_name => $::trove::params::taskmanager_package_name,
service_name => $::trove::params::taskmanager_service_name,
package_name => $trove::params::taskmanager_package_name,
service_name => $trove::params::taskmanager_service_name,
package_ensure => $package_ensure,
}

View File

@@ -105,11 +105,11 @@
#
# [*wsgi_script_dir*]
# (Optional) The directory to install the WSGI script for apache to read.
# Defaults to $::trove::params::trove_wsgi_script_path
# Defaults to $trove::params::trove_wsgi_script_path
#
# [*wsgi_script_source*]
# (Optional) The location of the trove WSGI script
# Defaults to $::trove::params::trove_wsgi_script_source
# Defaults to $trove::params::trove_wsgi_script_source
#
# [*headers*]
# (Optional) Headers for the vhost.
@@ -159,8 +159,8 @@ class trove::wsgi::apache (
$error_log_pipe = undef,
$error_log_syslog = undef,
$custom_wsgi_process_options = {},
$wsgi_script_dir = $::trove::params::trove_wsgi_script_dir,
$wsgi_script_source = $::trove::params::trove_wsgi_script_source,
$wsgi_script_dir = $trove::params::trove_wsgi_script_dir,
$wsgi_script_source = $trove::params::trove_wsgi_script_source,
$headers = undef,
$request_headers = undef,
$vhost_custom_fragment = undef,
@@ -173,7 +173,7 @@ class trove::wsgi::apache (
openstacklib::wsgi::apache { 'trove_wsgi':
bind_host => $bind_host,
bind_port => $port,
group => $::trove::params::group,
group => $trove::params::group,
path => $path,
priority => $priority,
servername => $servername,
@@ -186,7 +186,7 @@ class trove::wsgi::apache (
ssl_crl_path => $ssl_crl_path,
ssl_key => $ssl_key,
threads => $threads,
user => $::trove::params::user,
user => $trove::params::user,
vhost_custom_fragment => $vhost_custom_fragment,
workers => $workers,
wsgi_daemon_process => 'trove',