Skip to content

Commit 56a6910

Browse files
authored
- DHCPServer: (#207)
* fix EnableSecurityGroups if resource is not running on a domain controller - DhcpServerAuthorization: * new resource to authorize DHCP server in AD - FailoverCluster: * add Networks support * add installation of required Windows Features * update documentation - HyperV: * remove unused code after migration to HyperVDsc - AddsDomainController: * add UnprotectFromAccidentalDeletion to allow dc promote if an existing AD computer account is protected
1 parent 217c1f7 commit 56a6910

File tree

15 files changed

+529
-208
lines changed

15 files changed

+529
-208
lines changed

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212

1313
- Fixed Typo in AddsDomainController documentation
1414

15+
16+
### Added
17+
18+
- AddsDomainController:
19+
- add UnprotectFromAccidentalDeletion to allow dc promote if an existing AD computer account is protected
20+
- DhcpServerAuthorization:
21+
- new resource to authorize DHCP server in AD
22+
- FailoverCluster:
23+
- add Networks support
24+
- add installation of required Windows Features
25+
- update documentation
26+
27+
### Changed
28+
29+
- DHCPServer:
30+
- fix EnableSecurityGroups if resource is not running on a domain controller
31+
- HyperV:
32+
- remove unused code after migration to HyperVDsc
33+
34+
1535
## [0.9.0] - 2023-02-08
1636

1737
### Added

doc/AddsDomainController.adoc

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,11 @@
6666
| Default: `C:\Windows\SYSVOL`
6767

6868
| SiteName
69-
|
69+
| Mandatory
7070
| String
7171
| The name of the site this Domain Controller will be added to.
72+
73+
Set value to 'Default-First-Site-Name' if the Domain Controller shall be added to default site.
7274
|
7375

7476
| IsReadOnlyReplica
@@ -85,6 +87,15 @@
8587
| - *True* (default)
8688
- False
8789

90+
| UnprotectFromAccidentalDeletion
91+
|
92+
| Boolean
93+
| Specifies if the 'Protect from accidental deletion' flag shall be removed from the AD computer account *before* promoting to a domain controller.
94+
95+
If the computer acts as domain controller the 'Protect from accidental deletion' flag will not changed anymore.
96+
| - *False* (default)
97+
- True
98+
8899
| InstallationMediaPath
89100
|
90101
| String
@@ -107,16 +118,7 @@ AddsDomainController:
107118
SysvolPath: C:\Windows\SYSVOL
108119
SiteName: London
109120
IsGlobalCatalog: true
110-
InstallationMediaPath: \\Server\Share
111-
112-
AddsDomainController:
113-
DomainName: contoso.com
114-
Credential: '[ENC=PE9ian...=]'
115-
SafeModeAdministratorPassword: '[ENC=PE9ian...=]'
116-
LogPath: C:\Windows\Logs
117-
SysvolPath: C:\Windows\SYSVOL
118-
SiteName: Berlin
119121
IsReadOnlyReplica: true
120-
IsGlobalCatalog: true
121-
122+
UnprotectFromAccidentalDeletion: true
123+
InstallationMediaPath: \\Server\Share
122124
----

doc/DhcpServerAuthorization.adoc

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// CommonTasks YAML Reference: DhcpServerAuthorization
2+
// ===================================================
3+
4+
:YmlCategory: DhcpServerAuthorization
5+
6+
:abstract: {YmlCategory} manages the authorizations of a DHCP server in Active Directory.
7+
8+
[#dscyml_dhcpserverauthorization]
9+
= DSC Resource '{YmlCategory}'
10+
11+
[[dscyml_dhcpserverauthorization_abstract, {abstract}]]
12+
{abstract}
13+
14+
15+
[cols="1,3a" options="autowidth" caption=]
16+
|===
17+
| Source | https://github.com/dsccommunity/CommonTasks/tree/main/source/DSCResources/DhcpServerAuthorization
18+
| DSC Resource | https://github.com/dsccommunity/xDhcpServer[xDhcpServer]
19+
| Documentation | https://github.com/dsccommunity/xDhcpServer/wiki/xDhcpServerAuthorization[xDhcpServerAuthorization]
20+
|===
21+
22+
23+
IMPORTANT: This resource must run on an Active Directory domain controller.
24+
25+
26+
.Attributes of category '{YmlCategory}'
27+
[cols="1,1,1,2a,1a" options="header"]
28+
|===
29+
| Parameter
30+
| Attribute
31+
| DataType
32+
| Description
33+
| Allowed Values
34+
35+
| DnsName
36+
|
37+
| String
38+
| DHCP Server FQDN or empty string for `localhost`.
39+
|
40+
41+
| IPAddress
42+
|
43+
| String
44+
| DHCP Server IP Address or empty string for `localhost`.
45+
|
46+
47+
| Ensure
48+
|
49+
| String
50+
| Whether the DHCP server should be authorized within Active Directory
51+
| - *Present* (default)
52+
- Removed
53+
54+
|===
55+
56+
57+
.Example
58+
[source, yaml]
59+
----
60+
DhcpServerAuthorization:
61+
# authorize remote DHCP server
62+
DnsName: dhcp.contoso.com
63+
IPAddress: 192.168.1.12
64+
Ensure: Present
65+
----

doc/FailoverCluster.adoc

Lines changed: 103 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// CommonTasks YAML Reference: Cluster
2-
// ===================================
1+
// CommonTasks YAML Reference: FailoverCluster
2+
// ===========================================
33

44
:YmlCategory: FailoverCluster
55

@@ -9,19 +9,20 @@
99
= DSC Resource '{YmlCategory}'
1010

1111

12-
[[dscyml_failover_abstract, {abstract}]]
12+
[[dscyml_failovercluster_abstract, {abstract}]]
1313
{abstract}
1414

1515

1616
[cols="1,3a" options="autowidth" caption=]
1717
|===
18-
| Source | https://github.com/dsccommunity/CommonTasks/tree/main/source/DSCResources/Cluster
18+
| Source | https://github.com/dsccommunity/CommonTasks/tree/main/source/DSCResources/FailoverCluster
1919
| DSC Resource | - https://github.com/dsccommunity/FailoverClusterDsc[FailoverClusterDsc]
2020
- https://github.com/dsccommunity/ActiveDirectoryDsc[ActiveDirectoryDsc]
21-
| Documentation | - https://github.com/dsccommunity/FailoverClusterDsc/wiki/WaitForCluster[WaitForCluster]
22-
- https://github.com/dsccommunity/FailoverClusterDsc/wiki/Cluster[Cluster]
21+
| Documentation | - https://github.com/dsccommunity/FailoverClusterDsc/wiki/Cluster[Cluster]
2322
- https://github.com/dsccommunity/FailoverClusterDsc/wiki/ClusterDisk[ClusterDisk]
23+
- https://github.com/dsccommunity/FailoverClusterDsc/wiki/ClusterNetwork[ClusterNetwork]
2424
- https://github.com/dsccommunity/FailoverClusterDsc/wiki/ClusterQuorum[ClusterQuorum]
25+
- https://github.com/dsccommunity/FailoverClusterDsc/wiki/WaitForCluster[WaitForCluster]
2526
- https://github.com/dsccommunity/ActiveDirectoryDsc/wiki/ADObjectPermissionEntry[ADObjectPermissionEntry]
2627
|===
2728

@@ -85,12 +86,18 @@ If this is not specified then the cluster computer object must have been prestag
8586
This parameter is optional if the quorum type is set to `NodeMajority`.
8687
|
8788

88-
| [[dscyml_failover_disks, {YmlCategory}/Disks]]<<dscyml_failover_disks_details, Disks>>
89+
| [[dscyml_failovercluster_disks, {YmlCategory}/Disks]]<<dscyml_failovercluster_disks_details, Disks>>
8990
|
9091
| Hashtable[]
9192
| Configures shared disks in a cluster.
9293
|
9394

95+
| [[dscyml_failovercluster_networks, {YmlCategory}/Networks]]<<dscyml_failovercluster_networks_details, Networks>>
96+
|
97+
| Hashtable[]
98+
| Configures cluster networks in a failover cluster.
99+
|
100+
94101
| Join
95102
|
96103
| Switch
@@ -129,8 +136,8 @@ When creating a cluster role the cluster service is creating the needed computer
129136
|===
130137

131138

132-
[[dscyml_failover_disks_details]]
133-
.Attributes of DSC Resource '<<dscyml_failover_disks>>'
139+
[[dscyml_failovercluster_disks_details]]
140+
.Attributes of DSC Resource '<<dscyml_failovercluster_disks>>'
134141
[cols="1,1,1,2a,1a" options="header"]
135142
|===
136143
| Parameter
@@ -161,6 +168,63 @@ When creating a cluster role the cluster service is creating the needed computer
161168
|===
162169

163170

171+
[[dscyml_failovercluster_networks_details]]
172+
.Attributes of DSC Resource '<<dscyml_failovercluster_networks>>'
173+
[cols="1,1,1,2a,1a" options="header"]
174+
|===
175+
| Parameter
176+
| Attribute
177+
| DataType
178+
| Description
179+
| Allowed Values
180+
181+
| Address
182+
| Key
183+
| String
184+
| The address for the cluster network in the format `10.0.0.0`.
185+
|
186+
187+
| AddressMask
188+
| Key
189+
| String
190+
| The address mask for the cluster network in the format `255.255.255.0`.
191+
|
192+
193+
| Name
194+
|
195+
| String
196+
| The name of the cluster network.
197+
198+
If the cluster network name is not in desired state it will be renamed to match this name.
199+
|
200+
201+
| Role
202+
|
203+
| String
204+
| The role of the cluster network.
205+
206+
If the cluster network role is not in desired state it will change to match this role.
207+
208+
The cluster network role can be set to either the value 0, 1 or 3.
209+
210+
- 0 -> Do not allow cluster network communication
211+
- 1 -> Allow cluster network communication only
212+
- 3 -> Allow cluster network communication and client connectivity
213+
| - 0
214+
- 1
215+
- 3
216+
217+
| Metric
218+
|
219+
| String
220+
| The metric number for the cluster network.
221+
222+
If the cluster network metric number is not in desired state it will be changed to match this metric number.
223+
|
224+
225+
|===
226+
227+
164228
.Example
165229
[source, yaml]
166230
----
@@ -186,4 +250,34 @@ FailoverCluster:
186250
Label: Disk4
187251
- Number: 5
188252
Label: Disk5
253+
Networks:
254+
- Address: 192.168.0.0
255+
AddressMask: 255.255.255.0
256+
Name: ClusterCom
257+
Role: 3
258+
- Address: 192.168.1.0
259+
AddressMask: 255.255.255.0
260+
Name: NoClusterCom
261+
Role: 0
262+
----
263+
264+
265+
.Recommended Lookup Options in `Datum.yml` (Excerpt)
266+
[source, yaml]
189267
----
268+
lookup_options:
269+
270+
FailoverCluster:
271+
merge_hash: deep
272+
FailoverCluster\Disks:
273+
merge_hash_array: UniqueKeyValTuples
274+
merge_options:
275+
tuple_keys:
276+
- Number
277+
FailoverCluster\Networks:
278+
merge_hash_array: UniqueKeyValTuples
279+
merge_options:
280+
tuple_keys:
281+
- Address
282+
- AddressMask
283+
----

doc/HyperV.adoc

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -451,21 +451,10 @@ The first entry will be the OS disk (C:\).
451451
| MAC-Address of the network adapter
452452
|
453453

454-
| IgnoreNetworkSetting
455-
|
456-
| Boolean
457-
| Specifies whether the IpAddress information for the network adapter is set or ignored
458-
| - *True* (default)
459-
- False
460-
461454
| [[dscyml_hyperv_vmmachines_networkadapters_networksetting, {YmlCategory}/VMMachines/NetworkAdapters/NetworkSetting]]<<dscyml_hyperv_vmmachines_networkadapters_networksetting_details, NetworkSetting>>
462455
|
463456
| Hashtable
464457
| Network settings
465-
466-
If `IgnoreNetworkSetting` is set to `True` the network settings are ignored.
467-
468-
*If network settings are not specified and parameter `IgnoreNetworkSetting` is set to `False` DHCP will be enabled on the network adapter.*
469458
|
470459

471460
| VlanId

doc/README.adoc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ ifdef::env-github[]
9292
- <<DhcpScopeOptions.adoc#, DhcpScopeOptions>>
9393
- <<DhcpScopes.adoc#, DhcpScopes>>
9494
- <<DhcpServer.adoc#, DhcpServer>>
95+
- <<DhcpServerAuthorization.adoc#, DhcpServerAuthorization>>
9596
- <<DhcpServerOptionDefinitions.adoc#, DhcpServerOptionDefinitions>>
9697
- <<DhcpServerOptions.adoc#, DhcpServerOptions>>
9798
- <<DiskAccessPaths.adoc#, DiskAccessPaths>>
@@ -245,7 +246,6 @@ ifndef::env-github[]
245246
| <<dscyml_chocolateypackages>> | <<dscyml_chocolateypackages_abstract>>
246247
| <<dscyml_chocolateypackages2nd>> | <<dscyml_chocolateypackages2nd_abstract>>
247248
| <<dscyml_chocolateypackages3rd>> | <<dscyml_chocolateypackages3rd_abstract>>
248-
| <<dscyml_cluster>> | <<dscyml_cluster_abstract>>
249249
| <<dscyml_computersettings>> | <<dscyml_computersettings_abstract>>
250250
| <<dscyml_configurationbase>> | <<dscyml_configurationbase_abstract>>
251251
| <<dscyml_configurationmanagerconfiguration>> | <<dscyml_configurationmanagerconfiguration_abstract>>
@@ -255,6 +255,7 @@ ifndef::env-github[]
255255
| <<dscyml_dhcpscopeoptions>> | <<dscyml_dhcpscopeoptions_abstract>>
256256
| <<dscyml_dhcpscopes>> | <<dscyml_dhcpscopes_abstract>>
257257
| <<dscyml_dhcpserver>> | <<dscyml_dhcpserver_abstract>>
258+
| <<dscyml_dhcpserverauthorization>> | <<dscyml_dhcpserverauthorization_abstract>>
258259
| <<dscyml_dhcpserveroptiondefinitions>> | <<dscyml_dhcpserveroptiondefinitions_abstract>>
259260
| <<dscyml_dhcpserveroptions>> | <<dscyml_dhcpserveroptions_abstract>>
260261
| <<dscyml_diskaccesspaths>> | <<dscyml_diskaccesspaths_abstract>>
@@ -285,6 +286,7 @@ ifndef::env-github[]
285286
| <<dscyml_exchangemailboxdatabasecopies>> | <<dscyml_exchangemailboxdatabasecopies_abstract>>
286287
| <<dscyml_exchangemailboxdatabases>> | <<dscyml_exchangemailboxdatabases_abstract>>
287288
| <<dscyml_exchangeprovisioning>> | <<dscyml_exchangeprovisioning_abstract>>
289+
| <<dscyml_failovercluster>> | <<dscyml_failovercluster_abstract>>
288290
| <<dscyml_filecontents>> | <<dscyml_filecontents_abstract>>
289291
| <<dscyml_filesandfolders>> | <<dscyml_filesandfolders_abstract>>
290292
| <<dscyml_firewallprofiles>> | <<dscyml_firewallprofiles_abstract>>
@@ -421,8 +423,6 @@ include::ChocolateyPackages2nd.adoc[leveloffset=+1]
421423
<<<<
422424
include::ChocolateyPackages3rd.adoc[leveloffset=+1]
423425
<<<<
424-
include::Cluster.adoc[leveloffset=+1]
425-
<<<<
426426
include::ComputerSettings.adoc[leveloffset=+1]
427427
<<<<
428428
include::ConfigurationBase.adoc[leveloffset=+1]
@@ -441,6 +441,8 @@ include::DhcpScopes.adoc[leveloffset=+1]
441441
<<<<
442442
include::DhcpServer.adoc[leveloffset=+1]
443443
<<<<
444+
include::DhcpServerAuthorization.adoc[leveloffset=+1]
445+
<<<<
444446
include::DhcpServerOptionDefinitions.adoc[leveloffset=+1]
445447
<<<<
446448
include::DhcpServerOptions.adoc[leveloffset=+1]
@@ -501,6 +503,8 @@ include::ExchangeMailboxDatabases.adoc[leveloffset=+1]
501503
<<<<
502504
include::ExchangeProvisioning.adoc[leveloffset=+1]
503505
<<<<
506+
include::FailoverCluster.adoc[leveloffset=+1]
507+
<<<<
504508
include::FileContents.adoc[leveloffset=+1]
505509
<<<<
506510
include::FilesAndFolders.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)