community / community.digitalocean / 1.26.0 / module / digital_ocean_project Manage a DigitalOcean project | "added in version" 1.6.0 of community.digitalocean" Authors: Tyler Auerbeck (@tylerauerbeck)community.digitalocean.digital_ocean_project (1.26.0) — module
Install with ansible-galaxy collection install community.digitalocean:==1.26.0
collections: - name: community.digitalocean version: 1.26.0
Manage a project in DigitalOcean
# 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"
id: description: - UUID of the project type: str name: description: - The human-readable name for the project. The maximum length is 175 characters and the name must be unique. type: str state: choices: - present - absent default: present description: - Indicate desired state of the target. - C(present) will create the project - C(absent) will delete the project, if it exists. type: str purpose: description: - The purpose of the project. The maximum length is 255 characters - Required if state is C(present) - If not one of DO provided purposes, will be prefixed with C(Other) - DO provided purposes can be found below - C(Just trying out DigitalOcean) - C(Class project/Educational Purposes) - C(Website or blog) - C(Web Application) - C(Service or API) - C(Mobile Application) - C(Machine Learning/AI/Data Processing) - C(IoT) - C(Operational/Developer tooling) type: str is_default: default: false description: - If true, all resources will be added to this project if no project is specified. type: bool description: description: - The description of the project. The maximum length is 255 characters. type: str environment: choices: - Development - Staging - Production description: - The environment of the projects resources. type: str oauth_token: aliases: - API_TOKEN description: - DigitalOcean OAuth token. Can be specified in C(DO_API_KEY), C(DO_API_TOKEN), or C(DO_OAUTH_TOKEN) environment variables required: true type: str
data: 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' type: dict