cisco.intersight.intersight_system_qos_policy_info module – Gather information about System QoS Policies in Cisco Intersight
Note
This module is part of the cisco.intersight collection (version 2.3.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_system_qos_policy_info
.
Synopsis
Retrieve comprehensive information about System QoS Policies and their configured classes from Cisco Intersight.
Query policies by organization, policy name, or filter by specific criteria.
Returns structured data combining policy metadata with detailed QoS class configurations.
Each policy includes all six QoS classes (Bronze, Silver, Gold, Platinum, Best Effort, FC) with their current settings.
Supports filtering by organization and policy name.
If no filters are provided, all System QoS Policies will be returned.
Returns structured data with both policy information and associated QoS class details.
Parameters
Parameter |
Comments |
---|---|
Public API Key ID associated with the private key. If not set, the value of the INTERSIGHT_API_KEY_ID environment variable is used. |
|
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. |
|
URI used to access the Intersight API. If not set, the value of the INTERSIGHT_API_URI environment variable is used. Default: |
|
The exact name of the System QoS Policy to retrieve information from. When specified, only the matching policy and its classes will be returned. |
|
The name of the organization to filter System QoS Policies by. Use ‘default’ for the default organization. When specified, only policies from this organization will be returned. |
|
If Choices:
|
|
Boolean control for verifying the api_uri TLS certificate Choices:
|
Examples
# Basic Usage Examples
- name: Get all System QoS Policies
cisco.intersight.intersight_system_qos_policy_info:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
register: all_qos_policies
- name: Get System QoS Policies from specific organization
cisco.intersight.intersight_system_qos_policy_info:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: DevNet
register: devnet_qos_policies
- name: Get specific System QoS Policy by name
cisco.intersight.intersight_system_qos_policy_info:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: DevNet
name: lab-system-qos
register: specific_qos_policy
- name: Display QoS classes from retrieved policy
ansible.builtin.debug:
msg: "Policy {{ item.Name }} has {{ item.Classes | length }} QoS classes configured"
loop: "{{ specific_qos_policy.intersight_system_qos_policies }}"
# Advanced filtering and conditional tasks
- name: Get all System QoS policies and show enabled classes
cisco.intersight.intersight_system_qos_policy_info:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
register: qos_policies
- name: Show enabled QoS classes for each policy
ansible.builtin.debug:
msg: |
Policy: {{ item.Name }}
Enabled Classes: {{ item.Classes | selectattr('AdminState', 'equalto', 'Enabled') | map(attribute='Name') | list }}
loop: "{{ qos_policies.intersight_system_qos_policies }}"
- name: Check if specific policy exists
cisco.intersight.intersight_system_qos_policy_info:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: production-qos
register: policy_check
- name: Fail if production policy doesn't exist
ansible.builtin.fail:
msg: "Production QoS policy not found!"
when: policy_check.intersight_system_qos_policies | length == 0
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
A list of System QoS Policies with their configurations Returned: always Sample: |