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 # Manages the nslcd server configuration file
# #
class nslcd::config inherits nslcd class nslcd::config inherits nslcd {
{ file {
file
{
$nslcd::config: $nslcd::config:
ensure => file, ensure => file,
owner => $nslcd::config_user, owner => $nslcd::config_user,
@ -13,4 +11,4 @@ class nslcd::config inherits nslcd
mode => $nslcd::config_mode, mode => $nslcd::config_mode,
content => template('nslcd/nslcd.erb'), content => template('nslcd/nslcd.erb'),
} }
} }

View File

@ -98,8 +98,7 @@
# Sets the time after which the LDAP server is considered to be permanently unavailable. # 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. # 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', Variant[Boolean,String[1]] $package_ensure = 'present',
String[1] $package_name = $nslcd::params::package_name, String[1] $package_name = $nslcd::params::package_name,
Boolean $package_manage = true, Boolean $package_manage = true,
@ -131,13 +130,11 @@ class nslcd
Optional[Integer] $idle_timelimit = undef, Optional[Integer] $idle_timelimit = undef,
Integer $reconnect_sleeptime = 1, Integer $reconnect_sleeptime = 1,
Integer $reconnect_retrytime = 10, Integer $reconnect_retrytime = 10,
) ) inherits nslcd::params {
inherits nslcd::params
{
contain nslcd::install contain nslcd::install
contain nslcd::config contain nslcd::config
contain nslcd::service contain nslcd::service
Class['nslcd::install'] Class['nslcd::install']
-> Class['nslcd::config'] -> Class['nslcd::config']
~> Class['nslcd::service'] ~> Class['nslcd::service']

View File

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

View File

@ -3,7 +3,7 @@
# Sets the default parameters for the nslcd class. # Sets the default parameters for the nslcd class.
# #
class nslcd::params { class nslcd::params {
case $::osfamily { case $facts['os']['family'] {
'Debian': { 'Debian': {
$package_name = 'nslcd' $package_name = 'nslcd'
$gid = 'nslcd' $gid = 'nslcd'
@ -26,7 +26,7 @@ class nslcd::params {
$config_mode = '0600' $config_mode = '0600'
} }
default: { 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.")
} }
} }
} }