Added support for OpenBSD into samba module.
This commit is contained in:
parent
caede51adb
commit
d1b8b02657
1 changed files with 42 additions and 13 deletions
|
@ -6,12 +6,35 @@ class samba::server {
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
}
|
}
|
||||||
|
|
||||||
service { "smb":
|
case $operatingsystem {
|
||||||
ensure => running,
|
openbsd: {
|
||||||
enable => true,
|
service { "nmbd":
|
||||||
hasstatus => true,
|
ensure => running,
|
||||||
hasrestart => true,
|
enable => true,
|
||||||
require => File["/etc/samba/smb.conf"],
|
binary => "/usr/local/libexec/nmbd",
|
||||||
|
start => "/usr/local/libexec/nmbd -D",
|
||||||
|
require => File["/etc/samba/smb.conf"],
|
||||||
|
subscribe => File["/etc/samba/smb.conf"],
|
||||||
|
}
|
||||||
|
service { "smbd":
|
||||||
|
ensure => running,
|
||||||
|
enable => true,
|
||||||
|
binary => "/usr/local/libexec/smbd",
|
||||||
|
start => "/usr/local/libexec/smbd -D",
|
||||||
|
require => File["/etc/samba/smb.conf"],
|
||||||
|
subscribe => File["/etc/samba/smb.conf"],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
service { "smb":
|
||||||
|
ensure => running,
|
||||||
|
enable => true,
|
||||||
|
hasstatus => true,
|
||||||
|
hasrestart => true,
|
||||||
|
require => File["/etc/samba/smb.conf"],
|
||||||
|
subscribe => File["/etc/samba/smb.conf"],
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "/etc/samba/smb.conf":
|
file { "/etc/samba/smb.conf":
|
||||||
|
@ -20,9 +43,11 @@ class samba::server {
|
||||||
"puppet:///files/samba/smb.conf", ],
|
"puppet:///files/samba/smb.conf", ],
|
||||||
mode => 0644,
|
mode => 0644,
|
||||||
owner => root,
|
owner => root,
|
||||||
group => root,
|
group => $operatingsystem ? {
|
||||||
|
openbsd => wheel,
|
||||||
|
default => root,
|
||||||
|
},
|
||||||
require => Package["samba"],
|
require => Package["samba"],
|
||||||
notify => Service["smb"],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "/etc/samba/lmhosts":
|
file { "/etc/samba/lmhosts":
|
||||||
|
@ -32,7 +57,10 @@ class samba::server {
|
||||||
"puppet:///samba/lmhosts", ],
|
"puppet:///samba/lmhosts", ],
|
||||||
mode => 0644,
|
mode => 0644,
|
||||||
owner => root,
|
owner => root,
|
||||||
group => root,
|
group => $operatingsystem ? {
|
||||||
|
openbsd => wheel,
|
||||||
|
default => root,
|
||||||
|
},
|
||||||
require => Package["samba"],
|
require => Package["samba"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,10 +82,11 @@ class samba::domainmember {
|
||||||
include samba::server
|
include samba::server
|
||||||
|
|
||||||
exec { "net join":
|
exec { "net join":
|
||||||
command => "net join -U ${samba_join_user}%'${samba_join_pass}'",
|
command => "net join -U ${samba_join_user}%'${samba_join_pass}'",
|
||||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||||
onlyif => "rpcclient localhost -c 'srvinfo' -U root%'' 2>&1 | grep 'NT_STATUS_CANT_ACCESS_DOMAIN_INFO'",
|
onlyif => "rpcclient localhost -c 'srvinfo' -U root%'' 2>&1 | grep 'NT_STATUS_CANT_ACCESS_DOMAIN_INFO'",
|
||||||
require => Service["smb"],
|
require => [ Package["samba"],
|
||||||
|
File["/etc/samba/smb.conf"], ],
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue