mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
win_domain_controller: optionally add -ReadOnlyReplica if true (#36017)
This commit is contained in:
parent
8fb66c18de
commit
09d939fb00
1 changed files with 6 additions and 1 deletions
|
@ -204,10 +204,15 @@ Try {
|
|||
if ($sysvol_path) {
|
||||
$install_params.SysvolPath = $sysvol_path
|
||||
}
|
||||
if ($read_only) {
|
||||
# while this is a switch value, if we set on $false site_name is required
|
||||
# https://github.com/ansible/ansible/issues/35858
|
||||
$install_params.ReadOnlyReplica = $true
|
||||
}
|
||||
if ($site_name) {
|
||||
$install_params.SiteName = $site_name
|
||||
}
|
||||
$install_result = Install-ADDSDomainController -NoRebootOnCompletion -ReadOnlyReplica:$read_only -Force @install_params
|
||||
$install_result = Install-ADDSDomainController -NoRebootOnCompletion -Force @install_params
|
||||
|
||||
Write-DebugLog "Installation completed, needs reboot..."
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue