community / community.digitalocean / 1.26.0 / module / digital_ocean_vpc_info Gather information about DigitalOcean VPCs | "added in version" 1.7.0 of community.digitalocean" Authors: Mark Mercado (@mamercad)community.digitalocean.digital_ocean_vpc_info (1.26.0) — module
Install with ansible-galaxy collection install community.digitalocean:==1.26.0
collections: - name: community.digitalocean version: 1.26.0
This module can be used to gather information about DigitalOcean VPCs.
- name: Fetch all VPCs community.digitalocean.digital_ocean_vpc_info: register: my_vpcs
- name: Fetch members of a VPC community.digitalocean.digital_ocean_vpc_info: members: true name: myvpc1 register: my_vpc_members
name: description: - The name of the VPC. type: str baseurl: default: https://api.digitalocean.com/v2 description: - DigitalOcean API base url. type: str members: default: false description: - Return VPC members (instead of all VPCs). type: bool timeout: default: 30 description: - The timeout in seconds used for polling DigitalOcean's API. type: int oauth_token: aliases: - api_token description: - DigitalOcean OAuth token. - There are several other environment variables which can be used to provide this value. - i.e., - C(DO_API_TOKEN), C(DO_API_KEY), C(DO_OAUTH_TOKEN) and C(OAUTH_TOKEN). type: str validate_certs: default: true description: - If set to C(no), the SSL certificates will not be validated. - This should only set to C(no) used on personally controlled sites using self-signed certificates. type: bool
data: description: All DigitalOcean VPCs, or, members of a VPC (with C(members=True)). returned: success sample: - created_at: '2021-02-06T17:57:22Z' default: true description: '' id: 0db3519b-9efc-414a-8868-8f2e6934688c ip_range: 10.116.0.0/20 name: default-nyc1 region: nyc1 urn: do:vpc:0db3519b-9efc-414a-8868-8f2e6934688c - links: {} members: [] meta: total: 0 type: dict