samba: Added datadir support for netlogon directory in samba::server::pdc
This commit is contained in:
parent
f33820a1f5
commit
20824e09d4
1 changed files with 22 additions and 4 deletions
|
@ -221,11 +221,12 @@ class samba::server::wins inherits samba::server::configs {
|
|||
|
||||
# Add Primary Domain Controller role to Samba server
|
||||
#
|
||||
class samba::server::pdc inherits samba::server::configs {
|
||||
class samba::server::pdc($datadir="/srv/netlogon") inherits samba::server::configs {
|
||||
|
||||
if $datadir != "/srv/netlogon" {
|
||||
file { "/srv/netlogon":
|
||||
ensure => directory,
|
||||
mode => "0755",
|
||||
ensure => link,
|
||||
target => $datadir,
|
||||
owner => "root",
|
||||
group => $::operatingsystem ? {
|
||||
"openbsd" => "wheel",
|
||||
|
@ -238,6 +239,23 @@ class samba::server::pdc inherits samba::server::configs {
|
|||
type => "samba_share_t",
|
||||
before => File["/srv/netlogon"],
|
||||
}
|
||||
}
|
||||
|
||||
file { $datadir:
|
||||
ensure => directory,
|
||||
mode => "0755",
|
||||
owner => "root",
|
||||
group => $::operatingsystem ? {
|
||||
"openbsd" => "wheel",
|
||||
default => "root",
|
||||
},
|
||||
seltype => "samba_share_t",
|
||||
before => Service["smb"],
|
||||
}
|
||||
selinux::manage_fcontext { "${datadir}(/.*)?":
|
||||
type => "samba_share_t",
|
||||
before => File[$datadir],
|
||||
}
|
||||
|
||||
samba::server::share { "netlogon":
|
||||
path => "/srv/netlogon",
|
||||
|
|
Loading…
Add table
Reference in a new issue