Fix #5 Adds a parameter to optionaly manage the service and package
This commit is contained in:
parent
3938771328
commit
3ba601b3b8
@ -12,4 +12,3 @@ class nslcd::config inherits nslcd {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -4,9 +4,11 @@
|
||||
class nslcd (
|
||||
$package_ensure = $nslcd::params::package_ensure,
|
||||
$package_name = $nslcd::params::package_name,
|
||||
$package_manage = $nslcd::params::package_manage,
|
||||
$service_ensure = $nslcd::params::service_ensure,
|
||||
$service_enable = $nslcd::params::service_enable,
|
||||
$service_name = $nslcd::params::service_name,
|
||||
$service_manage = $nslcd::params::service_manage,
|
||||
$uid = $nslcd::params::uid,
|
||||
$gid = $nslcd::params::gid,
|
||||
$config = $nslcd::params::config,
|
||||
|
@ -3,8 +3,10 @@
|
||||
# Installs the nslcd package.
|
||||
class nslcd::install inherits nslcd {
|
||||
|
||||
package { $nslcd::package_name:
|
||||
ensure => $nslcd::package_ensure,
|
||||
if $nslcd::package_manage {
|
||||
package { $nslcd::package_name:
|
||||
ensure => $nslcd::package_ensure,
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,8 +4,10 @@
|
||||
class nslcd::params {
|
||||
|
||||
$package_ensure = present
|
||||
$package_manage = true
|
||||
$service_ensure = running
|
||||
$service_enable = true
|
||||
$service_manage = true
|
||||
|
||||
$ldap_uris = ['ldap:///']
|
||||
$ldap_version = '3'
|
||||
|
@ -3,10 +3,12 @@
|
||||
# Manages the nslcd service.
|
||||
class nslcd::service inherits nslcd {
|
||||
|
||||
service { 'nslcd':
|
||||
ensure => $nslcd::service_ensure,
|
||||
enable => $nslcd::service_enable,
|
||||
name => $nslcd::service_name,
|
||||
if $nslcd::service_manage {
|
||||
service { 'nslcd':
|
||||
ensure => $nslcd::service_ensure,
|
||||
enable => $nslcd::service_enable,
|
||||
name => $nslcd::service_name,
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user