Fixed some style errors found with puppet-lint

This commit is contained in:
Gregory Ballantine 2023-04-02 15:30:41 -04:00
parent 2632cfbe59
commit 0286f81bbd
4 changed files with 13 additions and 22 deletions

View File

@ -2,10 +2,8 @@
#
# Manages the nslcd server configuration file
#
class nslcd::config inherits nslcd
{
file
{
class nslcd::config inherits nslcd {
file {
$nslcd::config:
ensure => file,
owner => $nslcd::config_user,

View File

@ -98,8 +98,7 @@
# Sets the time after which the LDAP server is considered to be permanently unavailable.
# Once this time is reached retries will be done only once per this time period.
#
class nslcd
(
class nslcd (
Variant[Boolean,String[1]] $package_ensure = 'present',
String[1] $package_name = $nslcd::params::package_name,
Boolean $package_manage = true,
@ -131,9 +130,7 @@ class nslcd
Optional[Integer] $idle_timelimit = undef,
Integer $reconnect_sleeptime = 1,
Integer $reconnect_retrytime = 10,
)
inherits nslcd::params
{
) inherits nslcd::params {
contain nslcd::install
contain nslcd::config
contain nslcd::service

View File

@ -2,14 +2,10 @@
#
# Installs the nslcd package.
#
class nslcd::install inherits nslcd
{
if $nslcd::package_manage
{
package
{
$nslcd::package_name:
ensure => $nslcd::package_ensure,
class nslcd::install inherits nslcd {
if $nslcd::package_manage {
package { $nslcd::package_name:
ensure => $nslcd::package_ensure,
}
}
}

View File

@ -3,7 +3,7 @@
# Sets the default parameters for the nslcd class.
#
class nslcd::params {
case $::osfamily {
case $facts['os']['family'] {
'Debian': {
$package_name = 'nslcd'
$gid = 'nslcd'
@ -26,7 +26,7 @@ class nslcd::params {
$config_mode = '0600'
}
default: {
fail("The ${module_name} module is not supported on an ${::osfamily} based system.")
fail("The ${module_name} module is not supported on an ${facts['os']['family']} based system.")
}
}
}