summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Borean <jborean93@gmail.com>2020-02-05 10:46:47 +1000
committerGitHub <noreply@github.com>2020-02-05 10:46:47 +1000
commit12e3adb23a793844baaf4d91b798a1b418c75179 (patch)
treef2ebac5d5c06d8338062206ddcd9bc655760e1ee
parent78470c43c21d834a9513fb309fb219b74a5d1cee (diff)
downloadansible-12e3adb23a793844baaf4d91b798a1b418c75179.tar.gz
win_domain_controller - add a deprecation warning for the log_path option (#67108)
-rw-r--r--docs/docsite/rst/porting_guides/porting_guide_2.10.rst1
-rw-r--r--lib/ansible/modules/windows/win_domain_controller.ps14
-rw-r--r--lib/ansible/modules/windows/win_domain_controller.py8
3 files changed, 11 insertions, 2 deletions
diff --git a/docs/docsite/rst/porting_guides/porting_guide_2.10.rst b/docs/docsite/rst/porting_guides/porting_guide_2.10.rst
index e6ddac4f38..6fe01a06a4 100644
--- a/docs/docsite/rst/porting_guides/porting_guide_2.10.rst
+++ b/docs/docsite/rst/porting_guides/porting_guide_2.10.rst
@@ -74,6 +74,7 @@ The following functionality will be removed in Ansible 2.14. Please update updat
* :ref:`redfish_config <redfish_config_module>`: the ``bios_attribute_name`` and ``bios_attribute_value`` options will be removed. To maintain the existing behavior use the ``bios_attributes`` option instead.
* :ref:`clc_aa_policy <clc_aa_policy_module>`: the ``wait`` parameter will be removed. It has always been ignored by the module.
* :ref:`redfish_config <redfish_config_module>`, :ref:`redfish_command <redfish_command_module>`: the behavior to select the first System, Manager, or Chassis resource to modify when multiple are present will be removed. Use the new ``resource_id`` option to specify target resource to modify.
+* :ref:`win_domain_controller <win_domain_controller_module>`: the ``log_path`` option will be removed. This was undocumented and only related to debugging information for module development.
diff --git a/lib/ansible/modules/windows/win_domain_controller.ps1 b/lib/ansible/modules/windows/win_domain_controller.ps1
index fe4acea37b..e399168eb2 100644
--- a/lib/ansible/modules/windows/win_domain_controller.ps1
+++ b/lib/ansible/modules/windows/win_domain_controller.ps1
@@ -110,6 +110,10 @@ $install_dns = Get-AnsibleParam -obj $params -name "install_dns" -type "bool"
$state = Get-AnsibleParam -obj $params -name "state" -validateset ("domain_controller", "member_server") -failifempty $result
$log_path = Get-AnsibleParam -obj $params -name "log_path"
+if ($log_path) {
+ $msg = "Param 'log_path' is deprecated. See the module docs for more information"
+ Add-DeprecationWarning -obj $result -message $msg -version "2.14"
+}
$_ansible_check_mode = Get-AnsibleParam -obj $params -name "_ansible_check_mode" -default $false
$global:log_path = $log_path
diff --git a/lib/ansible/modules/windows/win_domain_controller.py b/lib/ansible/modules/windows/win_domain_controller.py
index 0deaf1135e..9bc4f2d11e 100644
--- a/lib/ansible/modules/windows/win_domain_controller.py
+++ b/lib/ansible/modules/windows/win_domain_controller.py
@@ -77,6 +77,12 @@ options:
see U(https://docs.microsoft.com/en-us/powershell/module/addsdeployment/install-addsdomaincontroller).
type: bool
version_added: '2.10'
+ log_path:
+ description:
+ - The path to log any debug information when running the module.
+ - This option is deprecated and should not be used, it will be removed in Ansible 2.14.
+ - This does not relate to the C(-LogPath) paramter of the install controller cmdlet.
+ type: str
seealso:
- module: win_domain
- module: win_domain_computer
@@ -103,7 +109,6 @@ EXAMPLES = r'''
domain_admin_password: password123!
safe_mode_password: password123!
state: domain_controller
- log_path: C:\ansible_win_domain_controller.txt
# ensure a server is not a domain controller
# note that without an action wrapper, in the case where a DC is demoted,
@@ -116,7 +121,6 @@ EXAMPLES = r'''
domain_admin_password: password123!
local_admin_password: password123!
state: member_server
- log_path: C:\ansible_win_domain_controller.txt
- name: Promote server as a read only domain controller
win_domain_controller: