changed parameter name from forest_root_dns_domain to dns_domain_name (to match documentation and other win_domain* modules) and fix example which has win_domain_controller instead of win_domain for module name. (#23081)

pull/23087/head
jhawkesworth 8 years ago committed by Matt Davis
parent a3e2280e62
commit 4eba248a8e

@ -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;

@ -54,7 +54,7 @@ reboot_required:
EXAMPLES=r'''
# ensure the named domain is reachable from the target host; if not, create the domain in a new forest residing on the target host
- win_domain_controller:
- win_domain:
dns_domain_name: ansible.vagrant
safe_mode_password: password123!

Loading…
Cancel
Save