cisco.intersight.intersight_port_policy_info module – Gather information about Cisco Intersight Port Policies
Note
This module is part of the cisco.intersight collection (version 2.6.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_port_policy_info
.
Synopsis
Gathers information about Port Policies and their associated resources on Cisco Intersight.
Retrieves comprehensive information including breakout ports, server ports, uplink port channels, pin groups, and all other port configurations.
Supports filtering by policy name and organization.
For more information see Cisco Intersight.
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: |
|
Name of the Port Policy to retrieve information for. If not provided, information for all Port Policies will be returned. |
|
The name of the Organization to filter policies by. If not provided, policies from all accessible organizations will be returned. |
|
If Choices:
|
|
Boolean control for verifying the api_uri TLS certificate Choices:
|
Examples
- name: Get information about all Port Policies
cisco.intersight.intersight_port_policy_info:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
register: all_port_policies
- name: Get information about a specific Port Policy
cisco.intersight.intersight_port_policy_info:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "port-policy-example"
register: specific_policy
- name: Get information about Port Policies in a specific organization
cisco.intersight.intersight_port_policy_info:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
organization: "production"
register: org_policies
- name: Get information about a specific Port Policy in a specific organization
cisco.intersight.intersight_port_policy_info:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "port-policy-example"
organization: "production"
register: specific_org_policy
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
List of Port Policy information with all associated resources Returned: always Sample: |