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 (
|
class nslcd (
|
||||||
$package_ensure = $nslcd::params::package_ensure,
|
$package_ensure = $nslcd::params::package_ensure,
|
||||||
$package_name = $nslcd::params::package_name,
|
$package_name = $nslcd::params::package_name,
|
||||||
|
$package_manage = $nslcd::params::package_manage,
|
||||||
$service_ensure = $nslcd::params::service_ensure,
|
$service_ensure = $nslcd::params::service_ensure,
|
||||||
$service_enable = $nslcd::params::service_enable,
|
$service_enable = $nslcd::params::service_enable,
|
||||||
$service_name = $nslcd::params::service_name,
|
$service_name = $nslcd::params::service_name,
|
||||||
|
$service_manage = $nslcd::params::service_manage,
|
||||||
$uid = $nslcd::params::uid,
|
$uid = $nslcd::params::uid,
|
||||||
$gid = $nslcd::params::gid,
|
$gid = $nslcd::params::gid,
|
||||||
$config = $nslcd::params::config,
|
$config = $nslcd::params::config,
|
||||||
|
@ -3,8 +3,10 @@
|
|||||||
# Installs the nslcd package.
|
# Installs the nslcd package.
|
||||||
class nslcd::install inherits nslcd {
|
class nslcd::install inherits nslcd {
|
||||||
|
|
||||||
|
if $nslcd::package_manage {
|
||||||
package { $nslcd::package_name:
|
package { $nslcd::package_name:
|
||||||
ensure => $nslcd::package_ensure,
|
ensure => $nslcd::package_ensure,
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,8 +4,10 @@
|
|||||||
class nslcd::params {
|
class nslcd::params {
|
||||||
|
|
||||||
$package_ensure = present
|
$package_ensure = present
|
||||||
|
$package_manage = true
|
||||||
$service_ensure = running
|
$service_ensure = running
|
||||||
$service_enable = true
|
$service_enable = true
|
||||||
|
$service_manage = true
|
||||||
|
|
||||||
$ldap_uris = ['ldap:///']
|
$ldap_uris = ['ldap:///']
|
||||||
$ldap_version = '3'
|
$ldap_version = '3'
|
||||||
|
@ -3,10 +3,12 @@
|
|||||||
# Manages the nslcd service.
|
# Manages the nslcd service.
|
||||||
class nslcd::service inherits nslcd {
|
class nslcd::service inherits nslcd {
|
||||||
|
|
||||||
|
if $nslcd::service_manage {
|
||||||
service { 'nslcd':
|
service { 'nslcd':
|
||||||
ensure => $nslcd::service_ensure,
|
ensure => $nslcd::service_ensure,
|
||||||
enable => $nslcd::service_enable,
|
enable => $nslcd::service_enable,
|
||||||
name => $nslcd::service_name,
|
name => $nslcd::service_name,
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user