community.general.dnsimple_info (8.5.0) — module

Pull basic info from DNSimple API

| "added in version" 4.2.0 of community.general"

Authors: Edward Hilgendorf (@edhilgendorf)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Retrieve existing records and domains from DNSimple API.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get all domains from an account
  community.general.dnsimple_info:
    account_id: "1234"
    api_key: "1234"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get all records from a domain
  community.general.dnsimple_info:
    name: "example.com"
    account_id: "1234"
    api_key: "1234"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get all info from a matching record
  community.general.dnsimple_info:
    name: "example.com"
    record: "subdomain"
    account_id: "1234"
    api_key: "1234"

Inputs

    
name:
    description:
    - The domain name to retrieve info from.
    - Will return all associated records for this domain if specified.
    - If not specified, will return all domains associated with the account ID.
    type: str

record:
    description:
    - The record to find.
    - If specified, only this record will be returned instead of all records.
    required: false
    type: str

api_key:
    description: The API key to use.
    required: true
    type: str

sandbox:
    default: false
    description: Whether or not to use sandbox environment.
    required: false
    type: bool

account_id:
    description: The account ID to query.
    required: true
    type: str

Outputs

dnsimple_domain_info:
  contains:
    account_id:
      description: The account ID.
      type: int
    created_at:
      description: When the domain entry was created.
      type: str
    id:
      description: ID of the entry.
      type: int
    last_transferred_at:
      description: Date the domain was transferred, or empty if not.
      type: str
    name:
      description: Name of the record.
      type: str
    reverse:
      description: Whether or not it is a reverse zone record.
      type: bool
    updated_at:
      description: When the domain entry was updated.
      type: str
  description: Returns a list of dictionaries of all domains associated with the supplied
    account ID.
  elements: dict
  returned: success when O(name) is not specified
  sample:
  - account_id: 1234
    created_at: '2021-10-16T21:25:42Z'
    id: 123456
    last_transferred_at: null
    name: example.com
    reverse: false
    secondary: false
    updated_at: '2021-11-10T20:22:50Z'
  type: list
dnsimple_record_info:
  contains:
    content:
      description: Content of the returned record.
      type: str
    created_at:
      description: When the domain entry was created.
      type: str
    id:
      description: ID of the entry.
      type: int
    name:
      description: Name of the record.
      type: str
    parent_id:
      description: Parent record or null.
      type: int
    priority:
      description: Priority setting of the record.
      type: str
    regions:
      description: List of regions where the record is available.
      type: list
    system_record:
      description: Whether or not it is a system record.
      type: bool
    ttl:
      description: Record TTL.
      type: int
    type:
      description: Record type.
      type: str
    updated_at:
      description: When the domain entry was updated.
      type: str
    zone_id:
      description: ID of the zone that the record is associated with.
      type: str
  description: Returns a list of dictionaries that match the record supplied.
  elements: dict
  returned: success when O(name) and O(record) are specified
  sample:
  - content: 1.2.3.4
    created_at: '2021-11-15T23:55:51Z'
    id: 123456
    name: catheadbiscuit
    parent_id: null
    priority: null
    regions:
    - global
    system_record: false
    ttl: 3600
    type: A
    updated_at: '2021-11-15T23:55:51Z'
    zone_id: example.com
  type: list
dnsimple_records_info:
  contains:
    content:
      description: Content of the returned record.
      type: str
    created_at:
      description: When the domain entry was created.
      type: str
    id:
      description: ID of the entry.
      type: int
    name:
      description: Name of the record.
      type: str
    parent_id:
      description: Parent record or null.
      type: int
    priority:
      description: Priority setting of the record.
      type: str
    regions:
      description: List of regions where the record is available.
      type: list
    system_record:
      description: Whether or not it is a system record.
      type: bool
    ttl:
      description: Record TTL.
      type: int
    type:
      description: Record type.
      type: str
    updated_at:
      description: When the domain entry was updated.
      type: str
    zone_id:
      description: ID of the zone that the record is associated with.
      type: str
  description: Returns a list of dictionaries with all records for the domain supplied.
  elements: dict
  returned: success when O(name) is specified, but O(record) is not
  sample:
  - content: ns1.dnsimple.com admin.dnsimple.com
    created_at: '2021-10-16T19:07:34Z'
    id: 12345
    name: catheadbiscuit
    parent_id: null
    priority: null
    regions:
    - global
    system_record: true
    ttl: 3600
    type: SOA
    updated_at: '2021-11-15T23:55:51Z'
    zone_id: example.com
  type: list