cisco.intersight.intersight_target_claim module – Target claim configuraiton for Cisco Intersight
Note
This module is part of the cisco.intersight collection (version 1.0.19).
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_target_claim
.
New in version 2.8: of cisco.intersight
Synopsis
Target claim configuraiton for Cisco Intersight
Used to claim or unclaim a Target from Cisco Intersight
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—–
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: “https://intersight.com/api/v1” |
|
Claim code required for registering a new Target Required if state=present |
|
Device id (serial number) of target Targets containing multiple Target ids (e.g. IMM) can be formatted as <target1_id>&<target2_id> |
|
If If Choices:
|
|
If Choices:
|
|
Boolean control for verifying the api_uri TLS certificate Choices:
|
Examples
- name: Claim new Target
cisco.intersight.intersight_target_claim:
device_id: "{{ device_id }}"
claim_code: "{{ claim_code }}"
state: present
- name: Delete a Target (unclaim)
cisco.intersight.intersight_target_claim:
device_id: "{{ device_id }}"
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: {“api_response”: {“Account”: {“ClassId”: “mo.MoRef”, “Moid”: “8675309”, “ObjectType”: “iam.Account”, “link”: “https://www.intersight.com/api/v1/iam/Accounts/8675309”}, “AccountMoid”: “8675309”, “Ancestors”: null, “ClassId”: “asset.DeviceClaim”, “CreateTime”: “2021-05-10T17:32:13.522665238Z”, “Device”: {“ClassId”: “mo.MoRef”, “Moid”: “9035768”, “ObjectType”: “asset.DeviceRegistration”, “link”: “https://www.intersight.com/api/v1/asset/DeviceRegistrations/9035768”}, “DisplayNames”: {“short”: [“FDO241604EM\u0026FDO24161700”]}, “DomainGroupMoid”: “5b4e48a96a636d6d346cd1c5”, “ModTime”: “2021-05-10T17:32:13.522665238Z”, “Moid”: “8675309”, “ObjectType”: “asset.DeviceClaim”, “Owners”: [“90357688675309”], “PermissionResources”: null, “SecurityToken”: “A95486674376E”, “SerialNumber”: “FDO86753091\u0026FDO86753092”, “SharedScope”: “”, “Tags”: [], “trace_id”: “NB3e883980a98adace8f7b9c2409cced1a”}} |
Authors
Brandon Beck (@techBeck03)
CiscoUcs (@CiscoUcs)