The Ansible Collection for Equinix contains various plugins for managing Equinix services.
What is it?
This collection of Ansible modules enables workflows for interacting with the Equinix Digital Infrastructure APIs. We have modules for managing Equinix Metal devices, elastic IPs, and projects. Additional modules help you gather info about your Equinix Metal infrastructure to use in your playbooks.
Why do we love it?
- Easy to use
- low bar to entry using simple YAML
- Infrastructure as code that excels in configuration management
- Leverages the powerful Equinix Metal API
- Offers agentless provisioning of infrastructure or can be used with Terraform
- Well-established forum community and use-cases
How do you use it?
The collection is available on Ansible Galaxy and can be installed with the following command:
ansible-galaxy collection install equinix.cloud
The Python module dependencies are not installed by ansible-galaxy. They can be manually installed using pip:
pip install -r https://raw.githubusercontent.com/equinix-labs/ansible-collection-equinix/main/requirements.txt
You will also need an Equinix Metal API token. You can obtain an API token from the Equinix Metal Portal. Set the environment variable METAL_AUTH_TOKEN to your API token:
The following playbook creates a new device in a project you specify.
- name: create Equinix Metal device
Save this to a file named main.yml and edit it to use your own project ID.
To run the playbook, navigate to the directory containing the playbook file
main.yml and run the following command:
More info can be found at the Ansible Collection for Equinix GitHub repository.
Submit new feature requests on the Equinix Metal Roadmap.
Last updatedFebruary 25, 2024
Ready to kick the tires?
Sign up and get going today, or request a demo to get a tour from an expert.