diff --git a/lib/ansible/modules/windows/win_defrag.ps1 b/lib/ansible/modules/windows/win_defrag.ps1 index 666ffee6ed..56607015a5 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 fb03584505..7e9e3c5269 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'''