Skip to content

Commit 95c1f6e

Browse files
Doninelli DavideDoninelli Davide
Doninelli Davide
authored and
Doninelli Davide
committed
2 in 1
Add hosts_allow and host_deny at the share level Add inherit_acl and host msdfs at the share level Fix netbios_name default string #55 regenerated REFERENCE.md added +4 in samba test resource
1 parent 7146080 commit 95c1f6e

File tree

4 files changed

+59
-3
lines changed

4 files changed

+59
-3
lines changed

REFERENCE.md

+37-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ Data type: `Variant[Undef, String]`
188188

189189
This sets the NetBIOS name by which a Samba server is known.
190190

191-
Default value: `'%{facts.hostname}'`
191+
Default value: `'%{facts.networking.hostname}'`
192192

193193
##### <a name="-samba--domain_master"></a>`domain_master`
194194

@@ -584,6 +584,10 @@ The following parameters are available in the `samba::share` defined type:
584584
* [`writable`](#-samba--share--writable)
585585
* [`available`](#-samba--share--available)
586586
* [`browseable`](#-samba--share--browseable)
587+
* [`inherit_acl`](#-samba--share--inherit_acl)
588+
* [`host_msdfs`](#-samba--share--host_msdfs)
589+
* [`hosts_allow`](#-samba--share--hosts_allow)
590+
* [`hosts_deny`](#-samba--share--hosts_deny)
587591
* [`copy`](#-samba--share--copy)
588592
* [`create_mask`](#-samba--share--create_mask)
589593
* [`directory_mask`](#-samba--share--directory_mask)
@@ -652,6 +656,38 @@ This controls whether this share is seen in the list of available shares in a ne
652656

653657
Default value: `undef`
654658

659+
##### <a name="-samba--share--inherit_acl"></a>`inherit_acl`
660+
661+
Data type: `Optional[Boolean]`
662+
663+
The inherit acl parameter in Samba controls whether Access Control Lists (ACLs) set on parent directories are automatically inherited by new files and subdirectories created within them.
664+
665+
Default value: `undef`
666+
667+
##### <a name="-samba--share--host_msdfs"></a>`host_msdfs`
668+
669+
Data type: `Optional[Boolean]`
670+
671+
The host msdfs parameter controls whether the Samba server acts as an MSDFS root, facilitating redirection of file shares in a distributed file system.
672+
673+
Default value: `undef`
674+
675+
##### <a name="-samba--share--hosts_allow"></a>`hosts_allow`
676+
677+
Data type: `Optional[Array[String]]`
678+
679+
The hosts allow parameter limit access to these ip-addresses.
680+
681+
Default value: `undef`
682+
683+
##### <a name="-samba--share--hosts_deny"></a>`hosts_deny`
684+
685+
Data type: `Optional[Array[String]]`
686+
687+
The hosts deny parameter deny access to these ip-addresses.
688+
689+
Default value: `undef`
690+
655691
##### <a name="-samba--share--copy"></a>`copy`
656692

657693
Data type: `Optional[String]`

manifests/init.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
# Main smb.conf options
176176
Variant[Undef, String] $workgroup = 'WORKGROUP',
177177
Variant[Undef, String] $server_string = '%h server (Samba Server Version %v)',
178-
Variant[Undef, String] $netbios_name = '%{facts.hostname}',
178+
Variant[Undef, String] $netbios_name = '%{facts.networking.hostname}',
179179
Variant[Boolean, String] $domain_master = 'auto',
180180
Variant[Boolean, String] $preferred_master = 'auto',
181181
Variant[Undef, Boolean] $local_master = true,

manifests/share.pp

+20
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@
1717
# @param browseable
1818
# This controls whether this share is seen in the list of available shares in a net view and in the browse list.
1919
#
20+
# @param inherit_acl
21+
# The inherit acl parameter in Samba controls whether Access Control Lists (ACLs) set on parent directories are automatically inherited by new files and subdirectories created within them.
22+
#
23+
# @param host_msdfs
24+
# The host msdfs parameter controls whether the Samba server acts as an MSDFS root, facilitating redirection of file shares in a distributed file system.
25+
#
26+
# @param hosts_allow
27+
# The hosts allow parameter limit access to these ip-addresses.
28+
#
29+
# @param hosts_deny
30+
# The hosts deny parameter deny access to these ip-addresses.
31+
#
2032
# @param copy
2133
# This parameter allows you to "clone" service entries. The specified service is simply duplicated under the current service's name.
2234
#
@@ -104,6 +116,10 @@
104116
Optional[Boolean] $writable = undef,
105117
Optional[Boolean] $available = undef,
106118
Optional[Boolean] $browseable = undef,
119+
Optional[Boolean] $host_msdfs = undef,
120+
Optional[Boolean] $inherit_acl = undef,
121+
Optional[Array[String]] $hosts_allow = undef,
122+
Optional[Array[String]] $hosts_deny = undef,
107123
Optional[String] $copy = undef,
108124
Optional[String] $create_mask = undef,
109125
Optional[String] $directory_mask = undef,
@@ -163,6 +179,10 @@
163179
"${title}-writable": target => $target, key => 'writable', value => $writable;
164180
"${title}-available": target => $target, key => 'available', value => $available;
165181
"${title}-browseable": target => $target, key => 'browseable', value => $browseable;
182+
"${title}-host_msdfs": target => $target, key => 'host msdfs', value => $host_msdfs;
183+
"${title}-inherit_acl": target => $target, key => 'inherit acl', value => $inherit_acl;
184+
"${title}-hosts_allow": target => $target, key => 'hosts allow', value => $hosts_allow;
185+
"${title}-hosts_deny": target => $target, key => 'hosts deny', value => $hosts_deny;
166186
"${title}-copy": target => $target, key => 'copy', value => $copy;
167187
"${title}-create mask": target => $target, key => 'create mask', value => $create_mask;
168188
"${title}-directory mask": target => $target, key => 'directory mask', value => $directory_mask;

spec/defines/share_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
}
4444

4545
it {
46-
is_expected.to have_samba__option_resource_count(63)
46+
is_expected.to have_samba__option_resource_count(67)
4747
}
4848
end
4949
end

0 commit comments

Comments
 (0)