cisco.intersight.intersight_domain module – Manage UCS Domain Profiles in 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_domain.

Synopsis

  • Create, update, and delete UCS Domain Profiles (SwitchClusterProfiles) on Cisco Intersight.

  • Manages the associated SwitchProfiles (A and B), Fabric Interconnect assignments, and policy buckets.

  • Policies are attached to SwitchProfiles via the Intersight bulk API.

  • This module does not manage deployment of the domain profile.

  • 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"

assigned_switch_a_serial

string

The serial number of the Fabric Interconnect to assign to SwitchProfile A.

Resolved via the /network/ElementSummaries API endpoint using the Serial field.

assigned_switch_b_serial

string

The serial number of the Fabric Interconnect to assign to SwitchProfile B.

Resolved via the /network/ElementSummaries API endpoint using the Serial field.

auditd_policy

string

Name of the Audit Log Policy to associate with both Fabric Interconnects.

certificate_management_policy

string

Name of the Certificate Management Policy to associate with both Fabric Interconnects.

description

aliases: descr

string

The user-defined description of the UCS Domain Profile.

ldap_policy

string

Name of the LDAP Policy to associate with both Fabric Interconnects.

name

string / required

The name assigned to the UCS Domain Profile.

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

SwitchProfiles are automatically named {name}-A and {name}-B.

network_connectivity_policy

string

Name of the Network Connectivity (DNS) Policy to associate with both Fabric Interconnects.

ntp_policy

string

Name of the NTP Policy to associate with both Fabric Interconnects.

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"

port_policy_fi_a

string

Name of the Port Policy to associate with Fabric Interconnect A.

port_policy_fi_b

string

Name of the Port Policy to associate with Fabric Interconnect B.

snmp_policy

string

Name of the SNMP Policy to associate with both Fabric Interconnects.

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"

switch_control_policy

string

Name of the Switch Control Policy to associate with both Fabric Interconnects.

syslog_policy

string

Name of the Syslog Policy to associate with both Fabric Interconnects.

system_qos_policy

string

Name of the System QoS Policy to associate with both Fabric Interconnects.

This policy is mandatory for UCS Domain Profiles.

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)

vlan_policy_fi_a

string

Name of the VLAN Policy to associate with Fabric Interconnect A.

vlan_policy_fi_b

string

Name of the VLAN Policy to associate with Fabric Interconnect B.

vsan_policy_fi_a

string

Name of the VSAN Policy to associate with Fabric Interconnect A.

vsan_policy_fi_b

string

Name of the VSAN Policy to associate with Fabric Interconnect B.

Examples

- name: Create a basic UCS Domain Profile
  cisco.intersight.intersight_domain:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    organization: "default"
    name: "Domain-01"
    description: "Basic domain profile"
    system_qos_policy: "Default-QoS"
    state: present

- name: Create a UCS Domain Profile with switch assignments and policies
  cisco.intersight.intersight_domain:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    organization: "default"
    name: "Domain-01"
    description: "Full domain profile"
    assigned_switch_a_serial: "FDO23456ABC"
    assigned_switch_b_serial: "FDO23456DEF"
    vlan_policy_fi_a: "VLAN-Policy-A"
    vlan_policy_fi_b: "VLAN-Policy-B"
    vsan_policy_fi_a: "VSAN-Policy-A"
    vsan_policy_fi_b: "VSAN-Policy-B"
    port_policy_fi_a: "Port-Policy-A"
    port_policy_fi_b: "Port-Policy-B"
    ntp_policy: "NTP-Corp"
    syslog_policy: "Syslog-Corp"
    snmp_policy: "SNMP-Monitor"
    system_qos_policy: "QoS-Default"
    switch_control_policy: "Switch-Control"
    state: present

- name: Delete a UCS Domain Profile
  cisco.intersight.intersight_domain:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    name: "Domain-01"
    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 SwitchClusterProfile resource.

Returned: always

Sample: {"api_response": {"Name": "Domain-01", "ObjectType": "fabric.SwitchClusterProfile", "Organization": {"Moid": "675450ee69726530014753e2", "ObjectType": "organization.Organization"}, "Tags": [{"Key": "Environment", "Value": "Production"}]}}

Authors

  • Ron Gershburg (@rgershbu)