community.digitalocean.digital_ocean_project_info – Gather information about DigitalOcean Projects

Note

This plugin is part of the community.digitalocean collection (version 1.9.0).

To install it use: ansible-galaxy collection install community.digitalocean.

To use it in a playbook, specify: community.digitalocean.digital_ocean_project_info.

New in version 1.6.0: of community.digitalocean

Synopsis

  • This module can be used to gather information about Projects.

Parameters

Parameter Choices/Defaults Comments
id
string
Project ID that can be used to identify and reference a project.
name
string
Project name that can be used to identify and reference a project.
oauth_token
string
DigitalOcean OAuth token.
There are several other environment variables which can be used to provide this value.
i.e., - 'DO_API_TOKEN', 'DO_API_KEY', 'DO_OAUTH_TOKEN' and 'OAUTH_TOKEN'

aliases: api_token
timeout
integer
Default:
30
The timeout in seconds used for polling DigitalOcean's API.
validate_certs
boolean
    Choices:
  • no
  • yes ←
If set to no, the SSL certificates will not be validated.
This should only set to no used on personally controlled sites using self-signed certificates.

Examples

# Get specific project by id
- community.digitalocean.digital_ocean_project_info:
    id: cb1ef55e-3cd8-4c7c-aa5d-07c32bf41627

# Get specific project by name
- community.digitalocean.digital_ocean_project_info:
    name: my-project-name

# Get all projects
- community.digitalocean.digital_ocean_project_info:
  register: projects

Return Values

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

Key Returned Description
data
list / elements=dictionary
success
DigitalOcean project information

Sample:
[{'created_at': '2021-03-11T00:00:00Z', 'description': 'My project description', 'environment': 'Development', 'id': '12345678-abcd-efgh-5678-10111213', 'is_default': False, 'name': 'my-test-project', 'owner_id': 12345678, 'owner_uuid': '12345678-1234-4321-abcd-20212223', 'purpose': '', 'updated_at': '2021-03-11T00:00:00Z'}]


Authors

  • Tyler Auerbeck (@tylerauerbeck)