cisco.intersight.intersight_gpu_policy module – GPU policy configuration for Cisco Intersight

Note

This module is part of the cisco.intersight collection (version 2.18.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_gpu_policy.

Synopsis

  • GPU policy configuration for Cisco Intersight.

  • Used to configure Multi-Instance GPU (MIG) partitioning and GPU assignment on server profiles.

  • Supports NVIDIA H100, B200, and other MIG-capable GPUs managed through Intersight.

  • 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 of the GPU policy.

gpu_mode

string

The operating mode for GPUs in the server.

graphics configures GPUs for standard graphics/display use.

compute configures GPUs for compute workloads (CUDA, inference, training).

Choices:

  • "graphics"

  • "compute" ← (default)

gpu_thermal_threshold

integer

GPU thermal throttle threshold temperature in Celsius.

When GPU temperature exceeds this threshold, performance will be throttled to prevent damage.

Valid range depends on GPU model. Typical values are 80-95 for data center GPUs.

Set to 0 to use the platform default.

mig_enabled

boolean

Enable or disable Multi-Instance GPU (MIG) partitioning.

When enabled, each physical GPU can be partitioned into multiple isolated GPU instances.

MIG is supported on NVIDIA A100, H100, B200 and newer architectures.

Choices:

  • false ← (default)

  • true

mig_profiles

list / elements=dictionary

List of MIG partition profiles to apply when mig_enabled is true.

Each entry defines the partition configuration for a GPU slot.

If fewer profiles are specified than available GPUs, remaining GPUs use the default profile.

instance_count

integer

Number of MIG instances to create with the specified partition profile.

Maximum depends on the GPU model and partition profile selected.

Default: 1

partition_profile

string / required

The MIG partition profile name.

Common profiles for H100/B200 include 1g.10gb, 2g.20gb, 3g.40gb, 4g.40gb, 7g.80gb.

Use none to disable MIG on this specific slot.

slot_id

integer / required

The GPU slot number (1-8) this profile applies to.

name

string / required

The name assigned to the GPU policy.

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

organization

string

The name of the Organization this resource is assigned to.

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

Default: "default"

power_cap_watts

integer

Maximum power consumption per GPU in watts when power_capping_enabled is true.

Valid range depends on GPU model (e.g., H100 SXM supports 300-700W).

Set to 0 to use the platform default TDP.

power_capping_enabled

boolean

Enable or disable GPU power capping.

When enabled, GPU power consumption is limited to the power_cap_watts value.

Choices:

  • false ← (default)

  • true

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 GPU compute policy without MIG
  cisco.intersight.intersight_gpu_policy:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    organization: AI-Factory
    name: gpu-compute-default
    description: Standard GPU compute mode for inference
    gpu_mode: compute

- name: Create GPU policy with MIG partitioning for H100
  cisco.intersight.intersight_gpu_policy:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    name: gpu-mig-inference
    description: MIG partitioned for multi-tenant inference
    gpu_mode: compute
    mig_enabled: true
    mig_profiles:
      - slot_id: 1
        partition_profile: 3g.40gb
        instance_count: 2
      - slot_id: 2
        partition_profile: 7g.80gb
        instance_count: 1

- name: Create GPU policy with thermal and power limits
  cisco.intersight.intersight_gpu_policy:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    name: gpu-power-managed
    description: Power-managed GPU policy for dense deployments
    gpu_mode: compute
    gpu_thermal_threshold: 85
    power_capping_enabled: true
    power_cap_watts: 400

- name: Delete GPU policy
  cisco.intersight.intersight_gpu_policy:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    name: gpu-compute-default
    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": {"GpuMode": "compute", "MigEnabled": false, "Name": "gpu-compute-default", "ObjectType": "graphics.GpuPolicy"}}

Authors

  • Steve Fulmer (@stevefulme1)