Skip to content

equinix/ansible-collection-metal

Repository files navigation

Ansible Collection - equinix.metal

CICodecov

Slack Twitter Follow

This repository is Maintained!

The Ansible Equinix Metal collection includes a variety of Ansible content to help automate the management of Equinix Metal resources. This collection is maintained by the Equinix Metal team.

Ansible version compatibility

This collection has been tested against following Ansible versions: >=2.9.10.

Plugins and modules within a collection may be tested with only specific Ansible versions. A collection may contain metadata that identifies these versions. PEP440 is the schema used to describe the versions of Ansible.

Python version compatibility

This collection depends on packet-python. This collection requires Python 2.7 or greater.

Included content

Inventory plugins

Name Description
equinix.metal.device Equinix Metal Device inventory source

Modules

Name Description
equinix.metal.capacity_info Gather information about Equinix Metal capacity
equinix.metal.device Manage a bare metal server in Equinix Metal
equinix.metal.device_info Gather information about Equinix Metal devices
equinix.metal.facility_info Gather information about Equinix Metal facilities
equinix.metal.ip_info Gather information about project IP Addresses
equinix.metal.ip_subnet Assign IP subnet to a bare metal server.
equinix.metal.operating_system_info Gather information about Equinix Metal operating_systems
equinix.metal.org_info Gather information about Equinix Metal organizations
equinix.metal.plan_info Gather information about Equinix Metal plans
equinix.metal.project Create/delete a project in Equinix Metal
equinix.metal.project_info Gather information about Equinix Metal projects
equinix.metal.sshkey Create/delete an SSH key in Equinix Metal
equinix.metal.sshkey_info Gather information about Equinix Metal SSH keys
equinix.metal.user_info Gather information about the logged in user

Installing this collection

You can install the Equinix Metal collection with the Ansible Galaxy CLI:

ansible-galaxy collection install equinix.metal

You can also include it in a requirements.yml file and install it with ansible-galaxy collection install -r requirements.yml, using the format:

---
collections:
  - name: equinix.metal

The python module dependencies are not installed by ansible-galaxy. They can be manually installed using pip:

pip install -r requirements.txt

or:

pip install packet-python

Using this collection

You can either call modules by their Fully Qualified Collection Namespace (FQCN), such as equinix.metal.device, or you can call modules by their short name if you list the equinix.metal collection in the playbook's collections keyword:

---
TODO

NOTE: For Ansible 2.9, you may not see deprecation warnings when you run your playbooks with this collection. Use this documentation to track when a module is deprecated.

See Also:

Contributing to this collection

We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against the Equinix Metal collection repository.

If you require support, please email [email protected], visit the Equinix Metal IRC channel (#equinixmetal on freenode), subscribe to the Equinix Metal Community Slack channel or post an issue within this repository.

If you want to develop new content for this collection or improve what is already here, the easiest way to work on the collection is to clone it into one of the configured COLLECTIONS_PATHS, and work on it there.

Testing with ansible-test

Running sanity tests: ansible-test sanity --docker -v Running unit tests: ansible-test units -v --docker

Running integration tests:

cat << EOF > tests/integration/integration_config.yml
api_token: <YOUR EQUINIX METAL API TOKEN>
EOF
 ansible-test integration -v --docker

More information about contributing

Release notes

This project tags releases based on the Semantic Versioning specification. See https://semver.org/#semantic-versioning-specification-semver for more details. Please pin your dependencies accordingly.

Changes to this project can be reviewed in the CHANGELOG.rst file.

It is possible to follow changes to the changelog by subscribing to https://github.com/equinix/ansible-collection-metal/releases.atom, or "Watching" releases using the GitHub UI.

Roadmap

Publishing New Version

Prepare the release:

  • Refresh the README.md: tox -e add_docs
  • Refresh the changelog: tox -e antsibull-changelog -- release --verbose --version 1.1.0
  • Clean up the changelog fragments.
  • Commit everything and push a PR for review

Push the release:

  • Tag the release: git tag -s 1.0.0
  • Push the tag: git push origin 1.0.0

More information

Licensing

GNU General Public License v3.0 or later.

See LICENSE to see the full text.