cisco.intersight.intersight_resource_group module – Resource Group 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_resource_group.
Synopsis
Manages Resource Group configuration on Cisco Intersight.
Resource Groups define a set of resources that can be used for access control and organization assignment.
Users specify Intersight-managed UCS domains by their target name (as shown in the Intersight Targets page).
Optionally, specific servers (sub-targets) within a domain can be selected by serial number.
Resource Groups are account-level resources and are not scoped to an 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: |
|
The user-defined description for the Resource Group. |
|
The name assigned to the Resource Group. The name must be between 1 and 62 alphanumeric characters, allowing special characters :-_. |
|
List of Intersight-managed UCS domain resources to include in the Resource Group. Required when Each entry specifies a domain by its target name as shown in the Intersight GUI Targets page. When Multiple entries can be mixed, some with sub-targets and some without. |
|
The name of the Intersight-managed UCS domain target. Must match the target name exactly as displayed in the Intersight Targets page. |
|
List of server serial numbers to include as sub-targets within the domain. When specified, only these servers are included instead of the entire domain. Servers are automatically classified as Blades or RackUnits via the Intersight API. |
|
If If Choices:
|
|
List of tags in Key:<user-defined key> Value:<user-defined value> format. |
|
If Choices:
|
|
Boolean control for verifying the api_uri TLS certificate Choices:
|
Examples
- name: Create Resource Group for full UCS domains
cisco.intersight.intersight_resource_group:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "ucs-domains-group"
description: "Resource group for two UCS domains"
resources:
- domain_name: "ucs-domain-1"
- domain_name: "ucs-domain-2"
state: present
- name: Create Resource Group with sub-targets (specific servers)
cisco.intersight.intersight_resource_group:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "specific-servers-group"
description: "Only specific servers from the domain"
resources:
- domain_name: "ucs-domain-1"
sub_targets:
- "FCH26387BD1"
- "FCH243974ZD"
- "WZP26030TAV"
state: present
- name: Create Resource Group with mixed resources
cisco.intersight.intersight_resource_group:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "mixed-resources-group"
description: "Full domain and specific servers from another"
resources:
- domain_name: "ucs-domain-1"
- domain_name: "ucs-domain-2"
sub_targets:
- "FCH26387BD1"
- "WZP26030TAV"
state: present
- name: Delete Resource Group
cisco.intersight.intersight_resource_group:
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
name: "ucs-domains-group"
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
The API response output returned by the specified resource. Returned: always Sample: |