From b58cf0d23abd5ac6fffdfc78eb67b1b1bb11f631 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Tue, 9 May 2017 03:03:56 +0200 Subject: [PATCH] windows: Various small documentation fixes (#23138) --- lib/ansible/modules/windows/win_command.py | 2 +- lib/ansible/modules/windows/win_nssm.py | 2 +- lib/ansible/modules/windows/win_region.py | 8 ++++---- lib/ansible/modules/windows/win_shell.py | 7 ++++--- lib/ansible/modules/windows/win_updates.py | 12 ++++++------ lib/ansible/modules/windows/win_webpicmd.py | 8 ++++---- 6 files changed, 20 insertions(+), 19 deletions(-) diff --git a/lib/ansible/modules/windows/win_command.py b/lib/ansible/modules/windows/win_command.py index 10930bf99f..da25a100ea 100644 --- a/lib/ansible/modules/windows/win_command.py +++ b/lib/ansible/modules/windows/win_command.py @@ -38,7 +38,7 @@ description: options: free_form: description: - - the win_command module takes a free form command to run. There is no parameter actually named 'free form'. + - the C(win_command) module takes a free form command to run. There is no parameter actually named 'free form'. See the examples! required: true creates: diff --git a/lib/ansible/modules/windows/win_nssm.py b/lib/ansible/modules/windows/win_nssm.py index 25da4c5258..12ffc40b75 100644 --- a/lib/ansible/modules/windows/win_nssm.py +++ b/lib/ansible/modules/windows/win_nssm.py @@ -34,7 +34,7 @@ short_description: NSSM - the Non-Sucking Service Manager description: - nssm is a service helper which doesn't suck. See U(https://nssm.cc/) for more information. requirements: - - "nssm >= 2.24.0 # (install via win_chocolatey) win_chocolatey: name=nssm" + - "nssm >= 2.24.0 # (install via M(win_chocolatey)) C(win_chocolatey: name=nssm)" options: name: description: diff --git a/lib/ansible/modules/windows/win_region.py b/lib/ansible/modules/windows/win_region.py index a7d3c6d977..76660beb42 100644 --- a/lib/ansible/modules/windows/win_region.py +++ b/lib/ansible/modules/windows/win_region.py @@ -76,26 +76,26 @@ EXAMPLES = r''' format: en-AU copy_settings: True -# Set the unicode language to English Great Britain +# Set the unicode language to English Great Britain, reboot if required - win_region: unicode_language: en-GB register: result -- action: win_reboot +- win_reboot: when: result.restart_required # Set the location to United States - win_region: location: 244 -# Set format, location and unicode to English Australia and copy settings +# Set format, location and unicode to English Australia and copy settings, reboot if required - win_region: location: 12 format: en-AU unicode_language: en-AU register: result -- action: win_reboot +- win_reboot: when: result.restart_required ''' diff --git a/lib/ansible/modules/windows/win_shell.py b/lib/ansible/modules/windows/win_shell.py index 7cb5aa7b19..1fa72deab9 100644 --- a/lib/ansible/modules/windows/win_shell.py +++ b/lib/ansible/modules/windows/win_shell.py @@ -36,7 +36,7 @@ description: options: free_form: description: - - the win_shell module takes a free form command to run. There is no parameter actually named 'free form'. + - The C(win_shell) module takes a free form command to run. There is no parameter actually named 'free form'. See the examples! required: true creates: @@ -57,8 +57,9 @@ notes: better to use the M(win_command) module instead. Best practices when writing playbooks will follow the trend of using M(win_command) unless C(win_shell) is explicitly required. When running ad-hoc commands, use your best judgement. - - WinRM will not return from a command execution until all child processes created have exited. Thus, it is not possible to use win_shell to spawn - long-running child or background processes. Consider creating a Windows service for managing background processes. + - WinRM will not return from a command execution until all child processes created have exited. + Thus, it is not possible to use C(win_shell) to spawn long-running child or background processes. + Consider creating a Windows service for managing background processes. author: - Matt Davis ''' diff --git a/lib/ansible/modules/windows/win_updates.py b/lib/ansible/modules/windows/win_updates.py index c845165086..2ecf9cc315 100644 --- a/lib/ansible/modules/windows/win_updates.py +++ b/lib/ansible/modules/windows/win_updates.py @@ -63,15 +63,15 @@ options: - searched log_path: description: - - If set, win_updates will append update progress to the specified file. The directory must already exist. + - If set, C(win_updates) will append update progress to the specified file. The directory must already exist. required: false author: "Matt Davis (@mattdavispdx)" notes: -- win_updates must be run by a user with membership in the local Administrators group -- win_updates will use the default update service configured for the machine (Windows Update, Microsoft Update, WSUS, etc) -- win_updates does not manage reboots, but will signal when a reboot is required with the reboot_required return value. -- win_updates can take a significant amount of time to complete (hours, in some cases). Performance depends on many factors, including OS version, number of - updates, system load, and update server load. +- C(win_updates) must be run by a user with membership in the local Administrators group +- C(win_updates) will use the default update service configured for the machine (Windows Update, Microsoft Update, WSUS, etc) +- C(win_updates) does not manage reboots, but will signal when a reboot is required with the reboot_required return value. +- C(win_updates) can take a significant amount of time to complete (hours, in some cases). + Performance depends on many factors, including OS version, number of updates, system load, and update server load. ''' EXAMPLES = r''' diff --git a/lib/ansible/modules/windows/win_webpicmd.py b/lib/ansible/modules/windows/win_webpicmd.py index 7758de6bd7..89ccbc55ab 100644 --- a/lib/ansible/modules/windows/win_webpicmd.py +++ b/lib/ansible/modules/windows/win_webpicmd.py @@ -33,11 +33,11 @@ version_added: "2.0" short_description: Installs packages using Web Platform Installer command-line description: - Installs packages using Web Platform Installer command-line - (http://www.iis.net/learn/install/web-platform-installer/web-platform-installer-v4-command-line-webpicmdexe-rtw-release). - - Must be installed and present in PATH (see win_chocolatey module; 'webpicmd' is the package name, and you must install 'lessmsi' first too) - - Install IIS first (see win_feature module) + (U(http://www.iis.net/learn/install/web-platform-installer/web-platform-installer-v4-command-line-webpicmdexe-rtw-release)). + - Must be installed and present in PATH (see M(win_chocolatey) module; 'webpicmd' is the package name, and you must install 'lessmsi' first too) + - Install IIS first (see M(win_feature) module) notes: - - accepts EULAs and suppresses reboot - you will need to check manage reboots yourself (see win_reboot module) + - accepts EULAs and suppresses reboot - you will need to check manage reboots yourself (see M(win_reboot) module) options: name: description: