Puppet Class: samba
- Inherits:
- samba::params
- Inherited by:
-
samba::server::config
samba::client::install
samba::server::install
samba::server::service
samba::winbind::install
samba::winbind::service
- Defined in:
- manifests/init.pp
Overview
Class: Samba
This module will install and configure Samba
Parameters:
$client_manage
manage the samba client only
$server_manage
manage the samba server
$winbind_manage
Manage the winbind server
Winbind provides the ability to use Windows Domain accounts on
Linux systems
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'manifests/init.pp', line 19
class samba (
# Client package
$client_manage = false,
$package_name = $samba::params::package_name,
$package_ensure = $samba::params::package_ensure,
# Global config settings
$config = '/etc/samba/smb.conf',
$logdir = '/var/log/samba',
$hosts_allow = [],
$interfaces = [],
$global_workgroup = undef,
# Stand Alone Server Options
$sa_security = 'user',
$passdb_backend = 'tdbsam',
# Printer Options
$printer = true,
# Manage the packages
$manage_packages = true,
# Samba Server
$server_manage = false,
$server_package_name = $samba::params::server_package_name,
# Winbind
$winbind_manage = false,
) inherits samba::params {
include concat::setup
# validate input!
validate_absolute_path($logdir)
validate_bool($manage_packages)
validate_bool($client_manage)
validate_bool($server_manage)
validate_bool($winbind_manage)
validate_re($sa_security, [ 'user', 'share', 'server' ] )
validate_re($passdb_backend, [ 'smbpasswd', 'tdbsam', 'ldapsam' ] )
validate_bool($printer)
anchor { 'samba::begin': }
anchor { 'samba::end': }
# Samba client
if $client_manage {
Anchor['samba::begin'] ->
class { '::samba::client::install': } ->
Anchor['samba::end']
}
# Samba Server
if $server_manage and ! $winbind_manage {
Anchor['samba::begin'] ->
class { '::samba::server::install': } ->
class { '::samba::server::config': } ~>
class { '::samba::server::service': } ->
Anchor['samba::end']
}
# Winbind
if $winbind_manage and $server_manage {
Anchor['samba::begin'] ->
class { '::samba::server::install': } ->
class { '::samba::server::config': } ~>
class { '::samba::server::service': } ->
class {'::samba::winbind::install': } ->
class {'::samba::winbind::service': } ->
Anchor['samba::end']
}
}
|