ansible / ansible.builtin / v2.9.13 / module / intersight_info Gather information about Intersight | "added in version" 2.8 of ansible.builtin" Authors: David Soper (@dsoper2), CiscoUcs (@CiscoUcs) preview | supported by communityansible.builtin.intersight_info (v2.9.13) — module
pip
Install with pip install ansible==2.9.13
Gathers information about servers in L(Cisco Intersight,https://intersight.com).
This module was called C(intersight_facts) before Ansible 2.9. The usage did not change.
- name: Get info for all servers intersight_info: 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 info for servers by name intersight_info: 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
api_uri: default: https://intersight.com/api/v1 description: - URI used to access the Intersight API. - If not set, the value of the INTERSIGHT_API_URI environment variable is used. type: str use_proxy: default: true description: - If C(no), it will not use a proxy, even if one is defined in an environment variable on the target hosts. type: bool api_key_id: description: - Public API Key ID associated with the private key. - If not set, the value of the INTERSIGHT_API_KEY_ID environment variable is used. required: true type: str server_names: description: - Server names to retrieve information from. - An empty list will return all servers. required: true type: list validate_certs: default: true description: - Boolean control for verifying the api_uri TLS certificate type: bool api_private_key: description: - 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. required: true type: str
intersight_servers: contains: Moid: description: The unique identifier of this Managed Object instance. returned: always sample: 5978bea36ad4b000018d63dc type: str Name: description: The name of the server. returned: always sample: SJC18-L14-UCS1-1 type: str description: A list of Intersight Servers. See L(Cisco Intersight,https://intersight.com/apidocs) for details. returned: always type: complex