community.windows.win_defrag – Consolidate fragmented files on local volumes¶
Note
This plugin is part of the community.windows collection (version 1.3.0).
To install it use: ansible-galaxy collection install community.windows
.
To use it in a playbook, specify: community.windows.win_defrag
.
Synopsis¶
Locates and consolidates fragmented files on local volumes to improve system performance.
More information regarding
win_defrag
is available from: https://technet.microsoft.com/en-us/library/cc731650(v=ws.11.aspx)
Parameters¶
Examples¶
- name: Defragment all local volumes (in parallel)
community.windows.win_defrag:
parallel: yes
- name: 'Defragment all local volumes, except C: and D:'
community.windows.win_defrag:
exclude_volumes: [ C, D ]
- name: 'Defragment volume D: with normal priority'
community.windows.win_defrag:
include_volumes: D
priority: normal
- name: Consolidate free space (useful when reducing volumes)
community.windows.win_defrag:
freespace_consolidation: yes
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Dag Wieers (@dagwieers)