intersight_facts – Gather facts about Intersight¶
New in version 2.8.
Synopsis¶
Gathers facts about servers in Cisco Intersight.
Parameters¶
Parameter | Choices/Defaults | Comments |
---|---|---|
api_key_id
string
/ required
|
Public API Key ID associated with the private key.
|
|
api_private_key
path
/ required
|
Filename (absolute path) of a PEM formatted file that contains your private key to be used for Intersight API authentication.
|
|
api_uri
string
|
Default: "https://intersight.com/api/v1"
|
URI used to access the Intersight API.
|
server_names
list
/ required
|
Server names to retrieve facts from.
An empty list will return all servers.
|
|
use_proxy
boolean
|
|
If
no , it will not use a proxy, even if one is defined in an environment variable on the target hosts. |
validate_certs
boolean
|
|
Boolean control for verifying the api_uri TLS certificate
|
Examples¶
- name: Get facts for all servers
intersight_facts:
api_private_key: ~/Downloads/SecretKey.txt
api_key_id: 64612d300d0982/64612d300d0b00/64612d300d3650
server_names:
- debug:
msg: "server name {{ item.Name }}, moid {{ item.Moid }}"
loop: "{{ intersight_servers }}"
when: intersight_servers is defined
- name: Get facts for servers by name
intersight_facts:
api_private_key: ~/Downloads/SecretKey.txt
api_key_id: 64612d300d0982/64612d300d0b00/64612d300d3650
server_names:
- SJC18-L14-UCS1-1
- debug:
msg: "server moid {{ intersight_servers[0].Moid }}"
when: intersight_servers[0] is defined
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description | |
---|---|---|---|
intersight_servers
complex
|
always |
A list of Intersight Servers. See Cisco Intersight for details.
|
|
Moid
string
|
always |
The unique identifier of this Managed Object instance.
Sample:
5978bea36ad4b000018d63dc
|
|
Name
string
|
always |
The name of the server.
Sample:
SJC18-L14-UCS1-1
|
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]