New in version 2.4.
parameter | required | default | choices | comments |
---|---|---|---|---|
automatic |
no |
|
Configures AutomaticManagedPagefile for the entire system.
|
|
drive |
no |
The drive of the pagefile.
|
||
initial_size |
no |
The initial size of the pagefile in megabytes.
|
||
maximum_size |
no |
The maximum size of the pagefile in megabytes.
|
||
override |
no | yes |
|
Override the current pagefile on the drive.
|
remove_all |
no | no |
|
Remove all pagefiles in the system, not including automatic managed.
|
state |
no | query |
|
State of the pagefile.
|
system_managed |
no | no |
|
Configures current pagefile to be managed by the system.
|
test_path |
no | yes |
|
Use Test-Path on the drive to make sure the drive is accessible before creating the pagefile.
|
- name: Query pagefiles configuration win_pagefile: - name: Query C pagefile win_pagefile: drive: C - name: Set C pagefile, don't override if exists win_pagefile: drive: C initial_size: 1024 maximum_size: 1024 override: no state: present - name: Set C pagefile, override if exists win_pagefile: drive: C initial_size: 1024 maximum_size: 1024 state: present - name: Remove C pagefile win_pagefile: drive: C state: absent - name: Remove all current pagefiles, enable AutomaticManagedPagefile and query at the end win_pagefile: remove_all: yes automatic: yes - name: Remove all pagefiles disable AutomaticManagedPagefile and set C pagefile win_pagefile: drive: C initial_size: 2048 maximum_size: 2048 remove_all: yes automatic: no state: present - name: Set D pagefile, override if exists win_pagefile: drive: d initial_size: 1024 maximum_size: 1024 state: present
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
automatic_managed_pagefiles |
Whether the pagefiles is automatically managed.
|
When state is query. | boolean | True |
pagefiles |
Contains caption, description, initial_size, maximum_size and name for each pagefile in the system.
|
When state is query. | list | [{'caption': "c:\\ 'pagefile.sys'", 'maximum_size': 2048, 'initial_size': 2048, 'description': "'pagefile.sys' @ c:\\", 'name': 'c:\\pagefile.sys'}, {'caption': "d:\\ 'pagefile.sys'", 'maximum_size': 1024, 'initial_size': 1024, 'description': "'pagefile.sys' @ d:\\", 'name': 'd:\\pagefile.sys'}] |
Note
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.