win_domain: added option to set database and sysvol path (#34333)

* win_domain: added param to set database and sysvol path

* fixed up documentation to work with backslashes
This commit is contained in:
Jordan Borean 2018-01-04 06:32:01 +10:00 committed by GitHub
commit 38a31d3156
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 48 additions and 5 deletions

View file

@ -39,6 +39,8 @@ $parsed_args = Parse-Args $args -supports_check_mode $true
$check_mode = Get-AnsibleParam $parsed_args "_ansible_check_mode" -default $false
$dns_domain_name = Get-AnsibleParam $parsed_args "dns_domain_name" -failifempty $true
$safe_mode_admin_password = Get-AnsibleParam $parsed_args "safe_mode_password" -failifempty $true
$database_path = Get-AnsibleParam $parsed_args "database_path" -type "path"
$sysvol_path = Get-AnsibleParam $parsed_args "sysvol_path" -type "path"
$forest = $null
@ -72,6 +74,12 @@ If(-not $forest) {
InstallDNS=$true;
NoRebootOnCompletion=$true;
}
if ($database_path) {
$install_forest_args.DatabasePath = $database_path
}
if ($sysvol_path) {
$install_forest_args.SysvolPath = $sysvol_path
}
$iaf = Install-ADDSForest @install_forest_args