cisco.intersight.intersight_memory_persistent_policy module – Memory Persistent Policy configuration for Cisco Intersight

Note

This module is part of the cisco.intersight collection (version 2.12.0).

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 cisco.intersight.

To use it in a playbook, specify: cisco.intersight.intersight_memory_persistent_policy.

Synopsis

  • Manages Memory Persistent Policy configuration on Cisco Intersight.

  • Configure Persistent Memory Modules (PMM) on servers including security, goals, and namespaces.

  • Supports both Intersight-managed and Operating System-managed configuration modes.

  • For more information see Cisco Intersight.

Parameters

Parameter

Comments

api_key_id

string / required

Public API Key ID associated with the private key.

If not set, the value of the INTERSIGHT_API_KEY_ID environment variable is used.

api_private_key

path / required

Filename (absolute path) or string of PEM formatted private key data to be used for Intersight API authentication.

If a string is used, Ansible vault should be used to encrypt string data.

Ex. ansible-vault encrypt_string --vault-id tme@/Users/dsoper/Documents/vault_password_file ‘-----BEGIN EC PRIVATE KEY-----

<your private key data>

-----END EC PRIVATE KEY-----’

If not set, the value of the INTERSIGHT_API_PRIVATE_KEY environment variable is used.

api_uri

string

URI used to access the Intersight API.

If not set, the value of the INTERSIGHT_API_URI environment variable is used.

Default: "https://intersight.com/api/v1"

description

aliases: descr

string

The user-defined description for the Memory Persistent Policy.

Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_).

enable_goal

boolean

Enable goal configuration for Persistent Memory Modules.

The Goal configured will be applicable to all the Persistent Memory Modules.

Goal modification will delete all existing regions and namespaces along with their data during profile deployment.

New regions and namespaces will be created after goal modification.

Only applicable when management_mode is configured-from-intersight.

Choices:

  • false

  • true ← (default)

enable_security_passphrase

boolean

Enable secure passphrase for Persistent Memory Modules.

When enabled, requires secure_passphrase parameter.

Only applicable when management_mode is configured-from-intersight.

Choices:

  • false ← (default)

  • true

management_mode

string

Configuration management mode for Persistent Memory.

configured-from-intersight - Policy settings are configured and managed from Intersight.

configured-from-operating-system - Associated servers are managed by Operating System tools and policy settings are unavailable.

When set to configured-from-operating-system, no other configuration fields are required or used.

Choices:

  • "configured-from-intersight" ← (default)

  • "configured-from-operating-system"

memory_mode_percentage

integer

Volatile memory percentage for Memory Mode.

Valid range is 0-100.

Only applicable when enable_goal is true and management_mode is configured-from-intersight.

Default: 0

name

string / required

The name assigned to the Memory Persistent Policy.

The name must be between 1 and 62 alphanumeric characters, allowing special characters :-_.

namespaces

list / elements=dictionary

List of Logical Namespaces to be created or modified on the server.

Only applicable when management_mode is configured-from-intersight.

capacity

integer / required

Capacity of this Namespace in GiB.

Valid range is 1 to 9223372036854775807.

mode

string

Mode of this Namespace.

Choices:

  • "raw" ← (default)

  • "block"

name

string / required

Name of this Namespace to be created on the server.

socket_id

integer

Socket ID of the region on which this Namespace has to be created or modified.

Valid values are 1, 2, 3, or 4.

Choices:

  • 1 ← (default)

  • 2

  • 3

  • 4

socket_memory_id

integer

Socket Memory ID of the region on which this Namespace has to be created or modified.

Only applicable when persistent_memory_type is app-direct-non-interleaved.

Valid values are 2, 4, 6, 8, 10, or 12.

Choices:

  • 2 ← (default)

  • 4

  • 6

  • 8

  • 10

  • 12

organization

string

The name of the Organization this resource is assigned to.

Policies created within a Custom Organization are applicable only to devices in the same Organization.

Default: "default"

persistent_memory_type

string

Type of Persistent Memory configuration.

app-direct - Persistent Memory Modules are combined in an interleaved set.

app-direct-non-interleaved - Persistent Memory Modules are not interleaved.

Only applicable when enable_goal is true and management_mode is configured-from-intersight.

Choices:

  • "app-direct" ← (default)

  • "app-direct-non-interleaved"

retain_namespaces

boolean

Retain existing Persistent Memory Namespaces.

If false, all existing namespaces not listed in the namespaces parameter will be deleted along with their data.

Only applicable when management_mode is configured-from-intersight.

Choices:

  • false

  • true ← (default)

secure_passphrase

string

Secure passphrase to be applied on the Persistent Memory Modules on the server.

Required when enable_security_passphrase is true.

The allowed characters are a-z, A-Z, 0-9, and special characters =, !, &,

Only applicable when management_mode is configured-from-intersight.

state

string

If present, will verify the resource is present and will create if needed.

If absent, will verify the resource is absent and will delete if needed.

Choices:

  • "present" ← (default)

  • "absent"

tags

list / elements=dictionary

List of tags in Key:<user-defined key> Value:<user-defined value> format.

use_proxy

boolean

If no, it will not use a proxy, even if one is defined in an environment variable on the target hosts.

Choices:

  • false

  • true ← (default)

validate_certs

boolean

Boolean control for verifying the api_uri TLS certificate

Choices:

  • false

  • true ← (default)

Examples

- name: Create Memory Persistent Policy with Intersight management
  cisco.intersight.intersight_memory_persistent_policy:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    organization: "default"
    name: "pmem-policy-01"
    description: "Persistent Memory policy with security and namespaces"
    management_mode: configured-from-intersight
    enable_security_passphrase: true
    secure_passphrase: "SecurePass123!"
    enable_goal: true
    memory_mode_percentage: 0
    persistent_memory_type: app-direct
    retain_namespaces: true
    namespaces:
      - name: "ns1"
        socket_id: 1
        capacity: 100000
        mode: raw
      - name: "ns2"
        socket_id: 4
        capacity: 1000065
        mode: block
    state: present

- name: Create Memory Persistent Policy with non-interleaved configuration
  cisco.intersight.intersight_memory_persistent_policy:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    organization: "default"
    name: "pmem-policy-non-interleaved"
    description: "Non-interleaved persistent memory configuration"
    management_mode: configured-from-intersight
    enable_security_passphrase: true
    secure_passphrase: "MySecurePass123"
    enable_goal: true
    memory_mode_percentage: 0
    persistent_memory_type: app-direct-non-interleaved
    retain_namespaces: true
    namespaces:
      - name: "ns1"
        socket_id: 1
        socket_memory_id: 2
        capacity: 100000
        mode: raw
      - name: "ns2"
        socket_id: 2
        socket_memory_id: 4
        capacity: 200000
        mode: block
    state: present

- name: Create Memory Persistent Policy with OS management
  cisco.intersight.intersight_memory_persistent_policy:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    organization: "default"
    name: "pmem-policy-os-managed"
    description: "OS-managed persistent memory configuration"
    management_mode: configured-from-operating-system
    state: present

- name: Create Memory Persistent Policy without security passphrase
  cisco.intersight.intersight_memory_persistent_policy:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    name: "pmem-policy-no-security"
    description: "Policy without security passphrase"
    management_mode: configured-from-intersight
    enable_security_passphrase: false
    enable_goal: true
    memory_mode_percentage: 10
    persistent_memory_type: app-direct
    state: present

- name: Delete Memory Persistent Policy
  cisco.intersight.intersight_memory_persistent_policy:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    name: "pmem-policy-01"
    state: absent

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

api_response

dictionary

The API response output returned by the specified resource.

Returned: always

Sample: {"api_response": {"Goals": [{"MemoryModePercentage": 0, "PersistentMemoryType": "app-direct", "SocketId": "All Sockets"}], "LocalSecurity": {"Enabled": true}, "LogicalNamespaces": [{"Capacity": 100000, "Mode": "raw", "Name": "ns1", "SocketId": 1, "SocketMemoryId": "Not Applicable"}], "ManagementMode": "configured-from-intersight", "Name": "pmem-policy-01", "ObjectType": "memory.PersistentMemoryPolicy", "RetainNamespaces": true}}

Authors

  • Ron Gershburg (@rgershbu)