From d3e16fa15b81431343d2f686a96fcea7a9be8c59 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Tue, 7 Nov 2017 16:35:54 +0100 Subject: [PATCH] win_defrag: Fixes to documentation (#32634) --- lib/ansible/modules/windows/win_defrag.ps1 | 21 +++---------- lib/ansible/modules/windows/win_defrag.py | 35 +++++++--------------- 2 files changed, 15 insertions(+), 41 deletions(-) diff --git a/lib/ansible/modules/windows/win_defrag.ps1 b/lib/ansible/modules/windows/win_defrag.ps1 index 666ffee6ed1..56607015a5b 100644 --- a/lib/ansible/modules/windows/win_defrag.ps1 +++ b/lib/ansible/modules/windows/win_defrag.ps1 @@ -1,23 +1,10 @@ #!powershell -# This file is part of Ansible +# -*- coding: utf-8 -*- # -# (c) 2017, Dag Wieers -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright: (c) 2017, Dag Wieers (@dagwieers) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -# WANT_JSON -# POWERSHELL_COMMON +#Requires -Module Ansible.ModuleUtils.Legacy $ErrorActionPreference = "Stop" diff --git a/lib/ansible/modules/windows/win_defrag.py b/lib/ansible/modules/windows/win_defrag.py index fb035845058..7e9e3c52696 100644 --- a/lib/ansible/modules/windows/win_defrag.py +++ b/lib/ansible/modules/windows/win_defrag.py @@ -1,42 +1,27 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright 2017, Dag Wieers -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# Copyright: 2017, Dag Wieers (@dagwieers) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} - DOCUMENTATION = r''' --- module: win_defrag version_added: '2.4' -short_description: Consolidate fragmented files on local volumes. +short_description: Consolidate fragmented files on local volumes description: - Locates and consolidates fragmented files on local volumes to improve system performance. - 'More information regarding C(win_defrag) is available from: U(https://technet.microsoft.com/en-us/library/cc731650(v=ws.11).aspx)' options: - included_volumes: + include_volumes: description: - A list of drive letters or mount point paths of the volumes to be defragmented. - If this parameter is omitted, all volumes (not excluded) will be fragmented. - excluded_volumes: + exclude_volumes: description: - A list of drive letters or mount point paths to exclude from defragmentation. freespace_consolidation: @@ -45,15 +30,17 @@ options: priority: description: - Run the operation at low or normal priority. - default: low choices: [ low, normal ] + default: low parallel: description: - Run the operation on each volume in parallel in the background. + type: bool default: 'no' - choices: [ 'yes', 'no' ] -requirements: [ defrag.exe ] -author: Dag Wieers (@dagwieers) +requirements: +- defrag.exe +author: +- Dag Wieers (@dagwieers) ''' EXAMPLES = r'''