ansible / ansible.builtin / v2.8.13 / module / win_pagefile Query or change pagefile configuration | "added in version" 2.4 of ansible.builtin" Authors: Liran Nisanov (@LiranNis) preview | supported by communityansible.builtin.win_pagefile (v2.8.13) — module
pip
Install with pip install ansible==2.8.13
Query current pagefile configuration.
Enable/Disable AutomaticManagedPagefile.
Create new or override pagefile configuration.
- 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
drive: description: - The drive of the pagefile. type: str state: choices: - absent - present - query default: query description: - State of the pagefile. type: str override: default: true description: - Override the current pagefile on the drive. type: bool automatic: description: - Configures AutomaticManagedPagefile for the entire system. type: bool test_path: default: true description: - Use Test-Path on the drive to make sure the drive is accessible before creating the pagefile. type: bool remove_all: default: false description: - Remove all pagefiles in the system, not including automatic managed. type: bool initial_size: description: - The initial size of the pagefile in megabytes. type: int maximum_size: description: - The maximum size of the pagefile in megabytes. type: int system_managed: default: false description: - Configures current pagefile to be managed by the system. type: bool
automatic_managed_pagefiles: description: Whether the pagefiles is automatically managed. returned: When state is query. sample: true type: bool pagefiles: description: Contains caption, description, initial_size, maximum_size and name for each pagefile in the system. returned: When state is query. sample: - caption: c:\ 'pagefile.sys' description: '''pagefile.sys'' @ c:\' initial_size: 2048 maximum_size: 2048 name: c:\pagefile.sys - caption: d:\ 'pagefile.sys' description: '''pagefile.sys'' @ d:\' initial_size: 1024 maximum_size: 1024 name: d:\pagefile.sys type: list