Prepare for voxpupuli-puppet-lint-plugins
Fix new lint errors detected when full of the voxpupili lint plugins are enabled. Change-Id: I2bdb5c200f3937ae018a8c34485ef3bd4d833763 Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
@@ -76,7 +76,6 @@ define openstacklib::db::mysql (
|
|||||||
# DEPRECATED PARAMETER
|
# DEPRECATED PARAMETER
|
||||||
Optional[String[1]] $password_hash = undef,
|
Optional[String[1]] $password_hash = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include mysql::server
|
include mysql::server
|
||||||
include mysql::client
|
include mysql::client
|
||||||
|
|
||||||
|
@@ -45,7 +45,6 @@ define openstacklib::db::mysql::host_access (
|
|||||||
Boolean $create_grant = true,
|
Boolean $create_grant = true,
|
||||||
Variant[String[1], Array[String[1]]] $tls_options = ['NONE'],
|
Variant[String[1], Array[String[1]]] $tls_options = ['NONE'],
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if ! ($title =~ /_/) {
|
if ! ($title =~ /_/) {
|
||||||
fail('Title must be $dbname_$host')
|
fail('Title must be $dbname_$host')
|
||||||
}
|
}
|
||||||
|
@@ -38,8 +38,7 @@ define openstacklib::db::postgresql (
|
|||||||
Variant[String[1], Array[String[1]]] $privileges = 'ALL',
|
Variant[String[1], Array[String[1]]] $privileges = 'ALL',
|
||||||
# DEPRECATED PARAMETERS
|
# DEPRECATED PARAMETERS
|
||||||
Optional[String[1]] $password_hash = undef,
|
Optional[String[1]] $password_hash = undef,
|
||||||
){
|
) {
|
||||||
|
|
||||||
if $password_hash != undef {
|
if $password_hash != undef {
|
||||||
warning('The password_hash parameter was deprecated and will be removed
|
warning('The password_hash parameter was deprecated and will be removed
|
||||||
in a future release. Use password instead')
|
in a future release. Use password instead')
|
||||||
|
@@ -16,12 +16,11 @@
|
|||||||
# (optional) ensure state for package.
|
# (optional) ensure state for package.
|
||||||
# Defaults to 'present'
|
# Defaults to 'present'
|
||||||
#
|
#
|
||||||
class openstacklib::iscsid(
|
class openstacklib::iscsid (
|
||||||
Boolean $enabled = true,
|
Boolean $enabled = true,
|
||||||
Boolean $manage_service = true,
|
Boolean $manage_service = true,
|
||||||
$package_ensure = 'present'
|
$package_ensure = 'present'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include openstacklib::params
|
include openstacklib::params
|
||||||
|
|
||||||
package { 'open-iscsi':
|
package { 'open-iscsi':
|
||||||
|
@@ -61,7 +61,7 @@
|
|||||||
# (optional) Manage or not the vhost
|
# (optional) Manage or not the vhost
|
||||||
# Defaults to true
|
# Defaults to true
|
||||||
#
|
#
|
||||||
define openstacklib::messaging::rabbitmq(
|
define openstacklib::messaging::rabbitmq (
|
||||||
String[1] $userid = 'guest',
|
String[1] $userid = 'guest',
|
||||||
String[1] $password = 'guest',
|
String[1] $password = 'guest',
|
||||||
String[1] $virtual_host = '/',
|
String[1] $virtual_host = '/',
|
||||||
@@ -73,7 +73,6 @@ define openstacklib::messaging::rabbitmq(
|
|||||||
Boolean $manage_user_permissions = true,
|
Boolean $manage_user_permissions = true,
|
||||||
Boolean $manage_vhost = true,
|
Boolean $manage_vhost = true,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if $manage_user {
|
if $manage_user {
|
||||||
if $userid == 'guest' {
|
if $userid == 'guest' {
|
||||||
$is_admin_real = false
|
$is_admin_real = false
|
||||||
@@ -101,5 +100,4 @@ define openstacklib::messaging::rabbitmq(
|
|||||||
'provider' => 'rabbitmqctl',
|
'provider' => 'rabbitmqctl',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -12,11 +12,10 @@
|
|||||||
# (Optional) The name of the package to install
|
# (Optional) The name of the package to install
|
||||||
# Defaults to $openstacklib::params::openstackclient_package_name
|
# Defaults to $openstacklib::params::openstackclient_package_name
|
||||||
#
|
#
|
||||||
class openstacklib::openstackclient(
|
class openstacklib::openstackclient (
|
||||||
$package_name = $openstacklib::params::openstackclient_package_name,
|
$package_name = $openstacklib::params::openstackclient_package_name,
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
) inherits openstacklib::params {
|
) inherits openstacklib::params {
|
||||||
|
|
||||||
stdlib::ensure_packages($package_name, {
|
stdlib::ensure_packages($package_name, {
|
||||||
'ensure' => $package_ensure,
|
'ensure' => $package_ensure,
|
||||||
'tag' => ['openstack', 'openstackclient']
|
'tag' => ['openstack', 'openstackclient']
|
||||||
|
@@ -4,7 +4,6 @@
|
|||||||
# should be considered to be constant
|
# should be considered to be constant
|
||||||
#
|
#
|
||||||
class openstacklib::params {
|
class openstacklib::params {
|
||||||
|
|
||||||
include openstacklib::defaults
|
include openstacklib::defaults
|
||||||
|
|
||||||
$openstackclient_package_name = 'python3-openstackclient'
|
$openstackclient_package_name = 'python3-openstackclient'
|
||||||
|
@@ -60,15 +60,16 @@ define openstacklib::policy (
|
|||||||
Enum['yaml'] $file_format = 'yaml',
|
Enum['yaml'] $file_format = 'yaml',
|
||||||
Boolean $purge_config = false,
|
Boolean $purge_config = false,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if empty($policies) {
|
if empty($policies) {
|
||||||
create_resources('openstacklib::policy::default', { $policy_path => {
|
create_resources('openstacklib::policy::default', {
|
||||||
file_mode => $file_mode,
|
$policy_path => {
|
||||||
file_user => $file_user,
|
file_mode => $file_mode,
|
||||||
file_group => $file_group,
|
file_user => $file_user,
|
||||||
file_format => $file_format,
|
file_group => $file_group,
|
||||||
purge_config => $purge_config,
|
file_format => $file_format,
|
||||||
}})
|
purge_config => $purge_config,
|
||||||
|
},
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
$policy_defaults = {
|
$policy_defaults = {
|
||||||
file_path => $policy_path,
|
file_path => $policy_path,
|
||||||
|
@@ -46,7 +46,6 @@ define openstacklib::policy::base (
|
|||||||
Enum['yaml'] $file_format = 'yaml',
|
Enum['yaml'] $file_format = 'yaml',
|
||||||
Boolean $purge_config = false,
|
Boolean $purge_config = false,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
ensure_resource('openstacklib::policy::default', $file_path, {
|
ensure_resource('openstacklib::policy::default', $file_path, {
|
||||||
file_path => $file_path,
|
file_path => $file_path,
|
||||||
file_mode => $file_mode,
|
file_mode => $file_mode,
|
||||||
|
@@ -37,7 +37,6 @@ define openstacklib::policy::default (
|
|||||||
Enum['yaml'] $file_format = 'yaml',
|
Enum['yaml'] $file_format = 'yaml',
|
||||||
Boolean $purge_config = false,
|
Boolean $purge_config = false,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
ensure_resource('file', $file_path, {
|
ensure_resource('file', $file_path, {
|
||||||
mode => $file_mode,
|
mode => $file_mode,
|
||||||
owner => $file_user,
|
owner => $file_user,
|
||||||
|
@@ -21,10 +21,9 @@
|
|||||||
# (required) The services that should be in the policy-rc.d shell script
|
# (required) The services that should be in the policy-rc.d shell script
|
||||||
# that should not autostart on install.
|
# that should not autostart on install.
|
||||||
#
|
#
|
||||||
class openstacklib::policyrcd(
|
class openstacklib::policyrcd (
|
||||||
Array[String[1]] $services
|
Array[String[1]] $services
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if $facts['os']['family'] == 'Debian' {
|
if $facts['os']['family'] == 'Debian' {
|
||||||
# We put this out there so openstack services wont auto start
|
# We put this out there so openstack services wont auto start
|
||||||
# when installed.
|
# when installed.
|
||||||
|
@@ -65,7 +65,7 @@
|
|||||||
# Environment to use
|
# Environment to use
|
||||||
# string; optional; default to empty array
|
# string; optional; default to empty array
|
||||||
#
|
#
|
||||||
define openstacklib::service_validation(
|
define openstacklib::service_validation (
|
||||||
$command,
|
$command,
|
||||||
$service_name = $name,
|
$service_name = $name,
|
||||||
$path = '/usr/bin:/bin:/usr/sbin:/sbin',
|
$path = '/usr/bin:/bin:/usr/sbin:/sbin',
|
||||||
@@ -78,7 +78,6 @@ define openstacklib::service_validation(
|
|||||||
$unless = undef,
|
$unless = undef,
|
||||||
$environment = [],
|
$environment = [],
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if $onlyif and $unless {
|
if $onlyif and $unless {
|
||||||
fail ('Only one parameter should be declared: onlyif or unless')
|
fail ('Only one parameter should be declared: onlyif or unless')
|
||||||
}
|
}
|
||||||
@@ -99,6 +98,4 @@ define openstacklib::service_validation(
|
|||||||
|
|
||||||
anchor { "create ${service_name} anchor": }
|
anchor { "create ${service_name} anchor": }
|
||||||
-> Exec<| title == "execute ${service_name} validation" |>
|
-> Exec<| title == "execute ${service_name} validation" |>
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -288,7 +288,6 @@ define openstacklib::wsgi::apache (
|
|||||||
$error_log_syslog = undef,
|
$error_log_syslog = undef,
|
||||||
$log_level = undef,
|
$log_level = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include apache
|
include apache
|
||||||
|
|
||||||
# Ensure there's no trailing '/' except if this is also the only character
|
# Ensure there's no trailing '/' except if this is also the only character
|
||||||
|
Reference in New Issue
Block a user