diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..d0d40ec --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "puppet.editorService.puppet.version": "7.23.0" +} \ No newline at end of file diff --git a/manifests/init.pp b/manifests/init.pp index 08ee45d..0c0146f 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -109,7 +109,7 @@ class nslcd Boolean $service_manage = true, String[1] $uid = 'nslcd', String[1] $gid = $nslcd::params::gid, - Stdlib::Unixpath $config = '/etc/nslcd.conf', + Stdlib::Unixpath $config = $nslcd::params::config, String[1] $config_user = 'root', String[1] $config_group = $nslcd::params::config_group, Stdlib::Filemode $config_mode = $nslcd::params::config_mode, @@ -141,4 +141,4 @@ inherits nslcd::params Class['nslcd::install'] -> Class['nslcd::config'] ~> Class['nslcd::service'] -} \ No newline at end of file +} diff --git a/manifests/params.pp b/manifests/params.pp index 7f29383..46d3696 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -2,27 +2,31 @@ # # Sets the default parameters for the nslcd class. # -class nslcd::params -{ - case $::osfamily - { - 'Debian': - { +class nslcd::params { + case $::osfamily { + 'Debian': { $package_name = 'nslcd' $gid = 'nslcd' + $config = '/etc/nslcd.conf' $config_group = 'nslcd' $config_mode = '0640' } - 'RedHat': - { + 'RedHat': { $package_name = 'nss-pam-ldapd' $gid = 'ldap' + $config = '/etc/nslcd.conf' $config_group = 'root' $config_mode = '0600' } - default: - { + 'FreeBSD': { + $package_name = 'nss-pam-ldapd' + $gid = 'nslcd' + $config = '/usr/local/etc/nslcd.conf' + $config_group = 'wheel' + $config_mode = '0600' + } + default: { fail("The ${module_name} module is not supported on an ${::osfamily} based system.") } } -} \ No newline at end of file +} diff --git a/manifests/service.pp b/manifests/service.pp index d2835ce..7f91431 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -2,16 +2,12 @@ # # Manages the nslcd service. # -class nslcd::service inherits nslcd -{ - if $nslcd::service_manage - { - service - { - 'nslcd': - ensure => $nslcd::service_ensure, - enable => $nslcd::service_enable, - name => $nslcd::service_name, +class nslcd::service inherits nslcd { + if $nslcd::service_manage { + service { 'nslcd': + ensure => $nslcd::service_ensure, + enable => $nslcd::service_enable, + name => $nslcd::service_name, } } -} \ No newline at end of file +} diff --git a/metadata.json b/metadata.json index d54d5bd..aae0ce4 100644 --- a/metadata.json +++ b/metadata.json @@ -1,12 +1,12 @@ { - "name": "geekix-nslcd", + "name": "ascendings-nslcd", "version": "0.4.3", - "author": "geekix", + "author": "ascendings", "summary": "Installs and configures nslcd.", "license": "Apache-2.0", - "source": "https://github.com/geekix/puppet-nslcd", - "project_page": "https://github.com/geekix/puppet-nslcd", - "issues_url": "https://github.com/geekix/puppet-nslcd/issues", + "source": "https://git.metaunix.net/Metaunix/puppet-nslcd", + "project_page": "https://git.metaunix.net/Metaunix/puppet-nslcd", + "issues_url": "https://git.metaunix.net/Metaunix/puppet-nslcd/issues", "dependencies": [ { "name": "puppetlabs-stdlib", @@ -38,6 +38,9 @@ "7", "8" ] + }, + { + "operatingsystem": "FreeBSD" } ], "requirements": [