cisco.intersight.intersight_power_policy module – Power Policy configuration for Cisco Intersight
Note
This module is part of the cisco.intersight collection (version 2.2.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_power_policy.
Synopsis
- Manages Power Policy configuration on Cisco Intersight.
- A policy to configure the power settings on Cisco Intersight managed servers.
- 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: |
description aliases: descr string | The user-defined description for the Power Policy. Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_). |
dynamic_power_rebalancing string | Sets the dynamic power rebalancing mode of the chassis. If enabled, this mode allows the chassis to dynamically reallocate the power between servers depending on their power usage. Applicable for ‘chassis’ and ‘all’ platforms. Choices:
|
extended_power_capacity string | Sets the Extended Power Capacity of the Chassis. If Enabled, this mode allows chassis available power to be increased by borrowing power from redundant power supplies. This option is only supported for Cisco UCS X series Chassis. Applicable for ‘chassis’ and ‘all’ platforms. Choices:
|
name string / required | The name assigned to the Power 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, Policies, and Pools that are created within a Custom Organization are applicable only to devices in the same Organization. Default: |
power_allocation integer | Sets the limit for the maximum input power consumption by the chassis (in Watts). Set to 0 for no limit. Applicable for ‘chassis’ and ‘all’ platforms. Default: |
power_priority string | Sets the Power Priority of the Server. This priority is used to determine the initial power allocation for servers. This field is only supported for Cisco UCS B series and X series servers. Applicable for ‘fi-attached-server’ and ‘all’ platforms. Choices:
|
power_profiling string | Sets the Power Profiling of the Server. If Enabled, this field allows the power manager to run power profiling utility to determine the power needs of the server. This field is only supported for Cisco UCS X series servers. Applicable for ‘fi-attached-server’ and ‘all’ platforms. Choices:
|
power_redundancy string | Sets the Power Redundancy Mode of the Chassis. Redundancy Mode determines the number of PSUs the chassis keeps as redundant. N+2 mode is only supported for Cisco UCS X series Chassis. Applicable for ‘chassis’ and ‘all’ platforms. Choices:
|
power_restore string | Sets the Power Restore State of the Server. In the absence of Intersight connectivity, the chassis/server will use this policy to recover the host power after a power loss event. Applicable for ‘standalone-server’, ‘fi-attached-server’, and ‘all’ platforms. Choices:
|
power_save_mode string | Sets the power save mode of the chassis. If the requested power budget is less than available power capacity, the additional PSUs not required to comply with redundancy policy are placed in power save mode. Applicable for ‘chassis’ and ‘all’ platforms. Choices:
|
processor_package_power_limit string | Sets the Processor Package Power Limit (PPL) of a server. PPL refers to the amount of power that a CPU can draw from the power supply. The Processor Package Power Limit (PPL) feature is currently available exclusively on Cisco UCS C225/C245 M8 servers. Applicable for ‘standalone-server’, ‘fi-attached-server’, and ‘all’ platforms. Choices:
|
state string | If If Choices:
|
tags list / elements=dictionary | List of tags in Key:<user-defined key> Value:<user-defined value> format. |
target_platform string | The platform type for which the power policy is intended. This determines which settings are applicable. This parameter is required when Choices:
|
use_proxy boolean | If Choices:
|
validate_certs boolean | Boolean control for verifying the api_uri TLS certificate Choices:
|
Examples
- name: Create a Power Policy for a Standalone Server
cisco.intersight.intersight_power_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "Standalone-Server-Power-Policy"
description: "Power policy for standalone servers, restores to last state."
target_platform: "standalone-server"
power_restore: "LastState"
processor_package_power_limit: "Minimum"
tags:
- Key: "Owner"
Value: "DevOps"
- name: Create a Power Policy for a Chassis with N+1 Redundancy
cisco.intersight.intersight_power_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "Chassis-N1-Redundancy"
description: "Power policy for chassis with N+1 redundancy."
target_platform: "chassis"
power_redundancy: "N+1"
power_save_mode: "Disabled"
power_allocation: 7500
- name: Create a universal Power Policy for FI-Attached Servers
cisco.intersight.intersight_power_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "FI-Attached-Default"
description: "Default power policy for all FI-attached servers."
target_platform: "fi-attached-server"
power_profiling: "Enabled"
power_priority: "Medium"
- name: Delete a Power Policy
cisco.intersight.intersight_power_policy:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "Standalone-Server-Power-Policy"
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: |
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/cisco/intersight/intersight_power_policy_module.html