community.digitalocean.digital_ocean_project – Manage a DigitalOcean project
Note
This plugin is part of the community.digitalocean collection (version 1.13.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.digitalocean
.
To use it in a playbook, specify: community.digitalocean.digital_ocean_project
.
New in version 1.6.0: of community.digitalocean
Parameters
Parameter |
Comments |
---|---|
The description of the project. The maximum length is 255 characters. |
|
The environment of the projects resources. Choices:
|
|
UUID of the project |
|
If true, all resources will be added to this project if no project is specified. Choices:
|
|
The human-readable name for the project. The maximum length is 175 characters and the name must be unique. |
|
DigitalOcean OAuth token. Can be specified in |
|
The purpose of the project. The maximum length is 255 characters Required if state is If not one of DO provided purposes, will be prefixed with DO provided purposes can be found below
|
|
Indicate desired state of the target.
Choices:
|
Examples
# Creates a new project
- community.digitalocean.digital_ocean_project:
name: "TestProj"
state: "present"
description: "This is a test project"
purpose: "IoT"
environment: "Development"
# Updates the existing project with the new environment
- community.digitalocean.digital_ocean_project:
name: "TestProj"
state: "present"
description: "This is a test project"
purpose: "IoT"
environment: "Production"
# This renames an existing project by utilizing the id of the project
- community.digitalocean.digital_ocean_project:
name: "TestProj2"
id: "12312312-abcd-efgh-ijkl-123123123123"
state: "present"
description: "This is a test project"
purpose: "IoT"
environment: "Development"
# This creates a project that results with a purpose of "Other: My Prod App"
- community.digitalocean.digital_ocean_project:
name: "ProdProj"
state: "present"
description: "This is a prod app"
purpose: "My Prod App"
environment: "Production"
# This removes a project
- community.digitalocean.digital_ocean_project:
name: "ProdProj"
state: "absent"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
a DigitalOcean Project Returned: changed Sample: {“project”: {“created_at”: “2021-05-28T00:00:00Z”, “description”: “This is a test description”, “environment”: “Development”, “id”: “12312312-abcd-efgh-1234-abcdefgh123”, “is_default”: false, “name”: “Test123”, “owner_id”: 1234567, “owner_uuid”: “12312312-1234-5678-abcdefghijklm”, “purpose”: “IoT”, “updated_at”: “2021-05-29T00:00:00Z”}} |
Authors
Tyler Auerbeck (@tylerauerbeck)