diff --git a/manifests/config.pp b/manifests/config.pp index 311043a..7cfb887 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -12,4 +12,3 @@ class nslcd::config inherits nslcd { } } - diff --git a/manifests/init.pp b/manifests/init.pp index 3f8402e..9ac6a41 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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, diff --git a/manifests/install.pp b/manifests/install.pp index c32f33d..22d28da 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -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, + } } } diff --git a/manifests/params.pp b/manifests/params.pp index 9bd989d..fc61ce3 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -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' diff --git a/manifests/service.pp b/manifests/service.pp index 299ba95..81978dd 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -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, + } } }