Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win_domain: fixes - changed parameter name from forest_root_dns_domain to dns_domain_name… #23081

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/ansible/modules/windows/win_domain.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 { }

Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/windows/win_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

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!

Expand Down