community.digitalocean.digital_ocean_project module – Manage a DigitalOcean project
Note
This module is part of the community.digitalocean collection (version 1.23.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 community.digitalocean 1.6.0
Synopsis
Manage a project in 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: |