equinix / equinix.metal / 1.4.1 / module / facility_info Gather information about Equinix Metal facilities | "added in version" 1.4.0 of equinix.metal" Authors: Jason DeTiberus (@detiber) <jdetiberus@equinix.com>equinix.metal.facility_info (1.4.1) — module
Install with ansible-galaxy collection install equinix.metal:==1.4.1
collections: - name: equinix.metal version: 1.4.1
Gather information about Equinix Metal facilities.
API is documented at U(https://metal.equinix.com/developers/api/facilities/).
# All the examples assume that you have your Equinix Metal API token in env var METAL_API_TOKEN. # You can also pass it to the api_token parameter of the module instead. - name: Gather information about all facilities hosts: localhost tasks: - equinix.metal.facility_info:
- name: Gather information about a particular facility using ID hosts: localhost tasks: - equinix.metal.facility_info: ids: - 173d7f11-f7b9-433e-ac40-f1571a38037a
ids: description: - One or more facility ids. elements: str type: list codes: description: - One or more facility codes. elements: str type: list api_token: aliases: - auth_token description: - The Equinix Metal API token to use - If not set, then the value of the METAL_API_TOKEN, PACKET_API_TOKEN, or PACKET_TOKEN environment variable is used. required: true type: str
facilities: description: Information about each facility that was found returned: always sample: '[{ ''id'': ''8e6470b3-b75e-47d1-bb93-45b225750975'', ''name'': ''Amsterdam, NL'', ''code'': ''ams1'', ''features'': [ ''baremetal'', ''storage'', ''global_ipv4'', ''backend_transfer'', ''layer_2'' ], ''address'': { ''href'': ''#0688e909-647e-4b21-bdf2-fc056d993fc5'' } }]' type: list