From c528d8b17d9e19ca4c8128f6fee1f955f4c5b4c2 Mon Sep 17 00:00:00 2001 From: jhawkesworth Date: Wed, 29 Mar 2017 19:34:45 +0100 Subject: [PATCH] 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) (cherry picked from commit 4eba248a8e84a64bff739fe4b8398b6ff53e57d2) --- lib/ansible/modules/windows/win_domain.ps1 | 6 +++--- lib/ansible/modules/windows/win_domain.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ansible/modules/windows/win_domain.ps1 b/lib/ansible/modules/windows/win_domain.ps1 index 144f3e6f776..99243e484f4 100644 --- a/lib/ansible/modules/windows/win_domain.ps1 +++ b/lib/ansible/modules/windows/win_domain.ps1 @@ -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; diff --git a/lib/ansible/modules/windows/win_domain.py b/lib/ansible/modules/windows/win_domain.py index 83f8e60b391..bccbf7d4bf4 100644 --- a/lib/ansible/modules/windows/win_domain.py +++ b/lib/ansible/modules/windows/win_domain.py @@ -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!