This migration guide is designed to help you transition from the equinix.metal Ansible collection to the newer equinix.cloud collection (on GitHub as equinix/ansible-collection-equinix).
- Ensure that you are using Ansible version >=2.9.10, as this is compatible with the equinix.metal collection
- Ensure that Python 2.7 or greater is installed, as it is required for equinix.metal
- Document all the equinix.metal modules and plugins you are currently using, as you will need to check for their equivalents or changes in the equinix.cloud collection.
Follow instructions on https://github.com/equinix/ansible-collection-equinix#installation
For the equinix.cloud collection, ensure that you have an Equinix Metal API token. Set the METAL_AUTH_TOKEN
environment variable with your API token:
export METAL_AUTH_TOKEN=your_api_token_here
- Review and compare your current playbooks that use
equinix.metal
. Look for tasks that reference modules starting withequinix.metal
(e.g.,equinix.metal.device
,equinix.metal.project_info
, etc.) - Replace these references with the new module names under the equinix.cloud namespace. For example, if you have a task that uses
equinix.metal.device
, you would update it toequinix.cloud.metal_device
. - Update any task parameters if there have been changes between the collections. This may require checking the documentation for each module within the equinix.cloud collection to confirm parameter names and acceptable values.
equinix.metal Module | equinix.cloud Equivalent |
---|---|
equinix.metal.capacity_info | Not present in the new collection yet, issue #135 |
equinix.metal.device | equinix.cloud.metal_device |
equinix.metal.device_info | equinix.cloud.metal_device_info |
equinix.metal.facility_info | "facility" is not a platform feature anymore |
equinix.metal.ip_info | equinix.cloud.metal_reserved_ip_block_info |
equinix.metal.ip_subnet | equinix.cloud.metal_reserved_ip_block |
equinix.metal.operating_system_info | equinix.cloud.metal_operating_system_info |
equinix.metal.org_info | equinix.cloud.metal_organization_info |
equinix.metal.plan_info | Not present in the new collection yet, issue #136 |
equinix.metal.project | equinix.cloud.metal_project |
equinix.metal.project_info | equinix.cloud.metal_project_info |
equinix.metal.sshkey | equinix.cloud.metal_ssh_key |
equinix.metal.sshkey_info | equinix.cloud.metal_ssh_key_info |
equinix.metal.user_info | Not present in the new collection yes, issue #137 |
After updating your playbooks, it's essential to test them in a non-production environment to ensure that all tasks execute as expected and that there are no issues with the new collection.
- Utilize the Equinix Community for support and to engage with other users who have made similar migrations.
- Keep an eye on the Ansible Collection for Equinix GitHub repository for updates, and submit new feature requests on the Equinix Metal Roadmap.
Remember that while the equinix.metal and equinix.cloud collections may be similar, there may be differences in functionality and features. Always refer to the official documentation for the most accurate and up-to-date information.