community.general.pmem module – Configure Intel Optane Persistent Memory modules
Note
This module is part of the community.general collection (version 5.8.3).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.general.pmem
.
New in community.general 4.5.0
Synopsis
This module allows Configuring Intel Optane Persistent Memory modules (PMem) using ipmctl and ndctl command line tools.
Requirements
The below requirements are needed on the host that executes this module.
ipmctl and ndctl command line tools
xmltodict
Parameters
Parameter |
Comments |
---|---|
Percentage of the total capacity to use in AppDirect Mode ( Create AppDirect capacity utilizing hardware interleaving across the requested PMem modules if applicable given the specified target. Total of appdirect, memorymode and reserved must be |
|
Create AppDirect capacity that is interleaved any other PMem modules. Choices:
|
|
Percentage of the total capacity to use in Memory Mode ( |
|
This enables to set the configuration for the namespace of the PMem. |
|
The mode of namespace. The detail of the mode is in the man page of ndctl-create-namespace. Choices:
|
|
The size of namespace. This option supports the suffixes This option is required if multiple namespaces are configured. If this option is not set, all of the available space of a region is configured. |
|
The type of namespace. The detail of the type is in the man page of ndctl-create-namespace. Choices:
|
|
Enable to append the new namespaces to the system. The default is Choices:
|
|
Percentage of the capacity to reserve ( reserved will be set automatically if this is not configured. |
|
This enables to set the configuration for each socket by using the socket ID. Total of appdirect, memorymode and reserved must be |
|
Percentage of the total capacity to use in AppDirect Mode ( |
|
Create AppDirect capacity that is interleaved any other PMem modules within the socket ID. Choices:
|
|
The socket ID of the PMem module. |
|
Percentage of the total capacity to use in Memory Mode ( |
|
Percentage of the capacity to reserve ( |
Examples
- name: Configure the Pmem as AppDirect 10, Memory Mode 70, and the Reserved 20 percent.
community.general.pmem:
appdirect: 10
memorymode: 70
- name: Configure the Pmem as AppDirect 10, Memory Mode 80, and the Reserved 10 percent.
community.general.pmem:
appdirect: 10
memorymode: 80
reserved: 10
- name: Configure the Pmem as AppDirect with not interleaved 10, Memory Mode 70, and the Reserved 20 percent.
community.general.pmem:
appdirect: 10
appdirect_interleaved: false
memorymode: 70
- name: Configure the Pmem each socket.
community.general.pmem:
socket:
- id: 0
appdirect: 10
appdirect_interleaved: false
memorymode: 70
reserved: 20
- id: 1
appdirect: 10
memorymode: 80
reserved: 10
- name: Configure the two namespaces.
community.general.pmem:
namespace:
- size: 1GB
type: pmem
mode: raw
- size: 320MB
type: pmem
mode: sector
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Indicates that the system reboot is required to complete the PMem configuration. Returned: success Sample: |
|
Shows the value of AppDirect, Memory Mode and Reserved size in bytes. If socket argument is provided, shows the values in each socket with If namespace argument is provided, shows the detail of each namespace. Returned: success Sample: |
|
AppDirect size in bytes. Returned: success |
|
Memory Mode size in bytes. Returned: success |
|
The list of the detail of namespace. Returned: success |
|
Reserved size in bytes. Returned: success |
|
The socket ID to be configured. Returned: success |
Collection links
Issue Tracker Repository (Sources) Submit a bug report Request a feature Communication