@ -37,7 +37,7 @@ Function Ensure-Prereqs {
$parsed_args = Parse-Args $args -supports_check_mode $true
$check_mode = Get-AnsibleParam $parsed_args " _ansible_check_mode " -default $false
$ forest_root_ dns_domain = Get-AnsibleParam $parsed_args " forest_root_ dns_domain" -failifempty $true
$ 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
$forest = $null
@ -54,7 +54,7 @@ $result = @{changed=$false; reboot_required=$false}
Ensure-Prereqs
Try {
$forest = Get-ADForest $ forest_root_ dns_domain -ErrorAction SilentlyContinue
$forest = Get-ADForest $ dns_domain_name -ErrorAction SilentlyContinue
}
Catch { }
@ -65,7 +65,7 @@ If(-not $forest) {
$sm_cred = ConvertTo-SecureString $safe_mode_admin_password -AsPlainText -Force
$install_forest_args = @ {
DomainName = $ forest_root_ dns_domain;
DomainName = $ dns_domain_name ;
SafeModeAdministratorPassword = $sm_cred ;
Confirm = $false ;
SkipPreChecks = $true ;