Open lucdekens opened 5 years ago
Using this information in the ExportVMHostConfiguration script would seriously lower the number of generated lines.
Just saying :-)
Yes I agree and I propose to add each configuration here as a separate comment and then add them to the repository with a single PR. What do you think ?
Sounds like a plan.
One aspect to consider before doing that is the relation between defaults and the vSphere version. Some defaults change with the vSphere version.
VMHostNtpSettings DSC Resource default configuration for vSphere versions 6.5, 6.7 and 7.0:
Configuration VMHostNtpSettings_Default_Config {
Param(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$Server,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[System.Management.Automation.PSCredential]
$Credential,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$VMHostName
)
Import-DscResource -ModuleName VMware.vSphereDSC
Node localhost {
VMHostNtpSettings VMHostNtpSettings {
Server = $Server
Credential = $Credential
Name = $VMHostName
NtpServer = @()
NtpServicePolicy = 'Off'
}
}
}
As discussed in #39 and #101, all resources shall contain a configuration file demonstrating the 'defaults' as taken by vSphere. The 'defaults' are the values taken by vSphere when no explicit values are specified.
Since the 'defaults' may change between vSphere versions, the configuration shall indicate for which vSphere version it contains the 'defaults'.