Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Latest commit

 

History

History
272 lines (236 loc) · 9.33 KB

equinix.metal.project_module.rst

File metadata and controls

272 lines (236 loc) · 9.33 KB

equinix.metal.project

Create/delete a project in Equinix Metal

Version added: 1.2.0

The below requirements are needed on the host that executes this module.

  • packet-python >= 1.43.1
Parameter Choices/Defaults Comments
api_token
string / required
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.

aliases: auth_token
custom_data
string
Custom data about the project to create.
id
string
UUID of the project which you want to remove.
name
string
Name for/of the project.
org_id
string
UUID of the organization to create a project for.
When blank, the API assumes the default organization.
payment_method
string
Payment method is name of one of the payment methods available to your user.
When blank, the API assumes the default payment method.
state
string
    Choices:
  • present ←
  • absent
Indicate desired state of the target.

# All the examples assume that you have your Equinix Metal API token in env var METAL_API_TOKEN.
# You can also pass the api token in module param api_token.

- name: Create new project
  hosts: localhost
  tasks:
    equinix.metal.project:
      name: "new project"

- name: Create new project within non-default organization
  hosts: localhost
  tasks:
    equinix.metal.project:
      name: "my org project"
      org_id: a4cc87f9-e00f-48c2-9460-74aa60beb6b0

- name: Remove project by id
  hosts: localhost
  tasks:
    equinix.metal.project:
      state: absent
      id: eef49903-7a09-4ca1-af67-4087c29ab5b6

- name: Create new project with non-default billing method
  hosts: localhost
  tasks:
    equinix.metal.project:
      name: "newer project"
      payment_method: "the other visa"

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
changed
boolean
success
True if a project was created or removed.

Sample:
True
id
string
success
UUID of addressed project.

name
string
success
Name of addressed project.



Authors