-
Create an account at metal.equinix.com
-
Create a new organization if needed
-
Create a new API key
-
Create Secret file
equinix_metal_secrets.yamlequinix_metal_payment_method_id: ... equinix_metal_organization_id: ... equinix_metal_api_token: ...
-
Create var file
equinix_metal_example.yamlenv_type: just-a-bunch-of-nodes cloud_provider: equinix_metal
-
Use podman with image Dockerfile-equinix_metal or install the same python modules as done in the image.
-
Run
ansible-playbook main.yml -e @/secrets/equinix_metal_secrets.yaml -e @/vars/equinix_metal_secrets.yaml
Tags in Equinix Metal are not a dictionary, but just a list of strings.
That means, agnosticd converts the tags provided by the config developer.
AgnosticD
tags: - key: "AnsibleGroup" value: "nodes" - key: "ostype" value: "linux" - key: "guid" value: "{{ guid }}"
Equinix Metal
tags: - AnsibleGroup=nodes - ostype=linux - guid=abcdf
List all available Operating Systems
curl -H "X-Auth-Token: $PACKET_API_TOKEN" \ https://api.equinix.com/metal/v1/operating-systems
List all facilities
curl -H "X-Auth-Token: $PACKET_API_TOKEN" https://api.equinix.com/metal/v1/facilities
-
Equinix Metal API: https://metal.equinix.com/developers/api/
-
Packet ansible guide: https://docs.ansible.com/ansible/latest/scenario_guides/guide_packet.html
-
Underlying python library: https://pypi.org/project/packet-python/