Skip to content

Windows Server Windows Server: DNS

Summary

This module contains actions for viewing & managing zones/records on a Windows DNS Server.

The following DNS record types are supported:

  • A
  • CName
  • PTR

DNS Server Role

Actions in this module will fail if the server does not have the DNS service installed.

In this scenario a friendly error will be displayed in the task interface.

Actions

windows_server.dns.

create_a_record

Create a new A record in the supplied zone.

Minimum Plugin Version: 2.2.0

Input
  • windows_server: a WindowsServer

  • zone_name: the name of the DNS zone

  • hostname: new record hostname

  • ip_address: new record IP address

  • create_ptr: set to true to create an associated PTR record (defaults so false)

Associated PTR

If creating an associated PTR fails, the A record will still be created.

In this scenario a friendly error will be displayed in the task interface.

Output

Nothing is outputted by this action.

Example
1
2
3
4
5
6
7
- windows_server.dns.create_a_record:
    zone_name: internal.net
    hostname: iis-001
    ip_address: 10.9.10.10
    create_ptr: true
  load:
    windows_server: windows_server

windows_server.dns.

create_cname_record

Create a new CName record in the supplied zone.

Minimum Plugin Version: 2.2.0

Input
  • windows_server: a WindowsServer

  • zone_name: the name of the DNS zone

  • name: new record name/alias

  • hostname: the fully qualified domain name

Output

Nothing is outputted by this action.

Example
1
2
3
4
5
6
- windows_server.dns.create_cname_record:
    zone_name: internal.net
    name: web-server
    hostname: iis-001.internal.net
  load:
    windows_server: windows_server

windows_server.dns.

delete_record

Delete a DNS record in the supplied zone.

Minimum Plugin Version: 2.2.0

Input

Record Type

This action requires a DNSRecord input as the delete operation is different for each type.

Output

Nothing is outputted by this action.

Example
1
2
3
4
5
- windows_server.dns.delete_record:
    zone_name: internal.net
  load:
    record: record
    windows_server: windows_server

windows_server.dns.

get_a_records

Get DNS A records from the supplied zone.

Minimum Plugin Version: 2.2.0

Input
  • windows_server: a WindowsServer

  • zone_name: the name of the DNS zone

Output

A list of DNSRecords.

Example
1
2
3
4
5
- windows_server.dns.get_a_records:
    zone_name: internal.net
  load:
    windows_server: windows_server
  save: a_records

windows_server.dns.

get_cname_records

Get DNS CName records from the supplied zone.

Minimum Plugin Version: 2.2.0

Input
  • windows_server: a WindowsServer

  • zone_name: the name of the DNS zone

Output

A list of DNSRecords.

Example
1
2
3
4
5
- windows_server.dns.get_cname_records:
    zone_name: internal.net
  load:
    windows_server: windows_server
  save: cname_records

windows_server.dns.

get_ptr_records

Get DNS PTR records from the supplied zone.

Minimum Plugin Version: 2.2.0

Input
  • windows_server: a WindowsServer

  • zone_name: the name of the DNS zone

Output

A list of DNSRecords.

Example
1
2
3
4
5
- windows_server.dns.get_ptr_records:
    zone_name: internal.net
  load:
    windows_server: windows_server
  save: ptr_records

windows_server.dns.

get_records

Get DNS records from the supplied zone.

Supported record types are:

  • A
  • CName
  • PTR

Minimum Plugin Version: 2.2.0

Input
  • windows_server: a WindowsServer

  • zone_name: the name of the DNS zone

Output

A list of DNSRecords.

Example
1
2
3
4
5
- windows_server.dns.get_records:
    zone_name: internal.net
  load:
    windows_server: windows_server
  save: dns_records

windows_server.dns.

get_zones

Get all DNS zones from a Windows Server.

Minimum Plugin Version: 2.2.0

Input
Output

A list of DNSZones.

Example
1
2
3
4
- windows_server.dns.get_zones:
  load:
    windows_server: windows_server
  save: dns_zones

windows_server.dns.

input_records_table

Display DNS records in a table, & allow the task operator to make a selection.

The table will have the following columns:

  • Hostname
  • Type
  • Time To Live
  • Data

Minimum Plugin Version: 2.2.0

Input
  • text: the title of the table

  • records: a list of DNSRecords to display in the table

  • minimum: the minimum number of acceptable selections

  • maximum: the maximum number of acceptable selections

Output

A list of DNSRecords.

Tip
  • If neither a minimum or maximum is provided, the task operator will be able to submit 0 selections.
  • If minimum or maximum are provided, the operation will repeat until the task operator makes a valid number of selections.
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
- windows_server.dns.get_records:
    zone_name: internal.net
  load:
    windows_server: windows_server
  save: dns_records

- windows_server.dns.input_records_table:
    text: Select Records
    minimum: 1
  load:
    records: dns_records
  save: selected_records

windows_server.dns.

input_zones_table

Display DNS zones in a table, & allow the task operator to make a selection.

The table will have the following columns:

  • Name
  • Type
  • Auto Created
  • DS Integrated
  • Reverse Lookup Zone
  • Signed

Minimum Plugin Version: 2.2.0

Input
  • text: the title of the table

  • zones: a list of DNSZones to display in the table

  • minimum: the minimum number of acceptable selections

  • maximum: the maximum number of acceptable selections

Output

A list of DNSZones.

Tip
  • If neither a minimum or maximum is provided, the task operator will be able to submit 0 selections.
  • If minimum or maximum are provided, the operation will repeat until the task operator makes a valid number of selections.
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
- windows_server.dns.get_zones:
  load:
    windows_server: windows_server
  save: dns_zones

- windows_server.dns.input_zones_table:
    text: Select Zones
    minimum: 1
  load:
    zones: dns_zones
  save: selected_zones

windows_server.dns.

output_records_table

Display DNS records in a table.

The table will have the following columns:

  • Hostname
  • Type
  • Time To Live
  • Data

Minimum Plugin Version: 2.2.0

Input
  • text: the title of the table

  • records: a list of DNSRecords to display in the table

Output

Nothing is outputted by this action.

Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
- windows_server.dns.get_records:
    zone_name: internal.net
  load:
    windows_server: windows_server
  save: dns_records

- windows_server.dns.output_records_table:
    text: DNS Records
  load:
    records: dns_records

windows_server.dns.

output_zones_table

Display DNS zones in a table.

The table will have the following columns:

  • Name
  • Type
  • Auto Created
  • DS Integrated
  • Reverse Lookup Zone
  • Signed

Minimum Plugin Version: 2.2.0

Input
  • text: the title of the table

  • zones: a list of DNSZones to display in the table

Output

Nothing is outputted by this action.

Example
1
2
3
4
5
6
7
8
9
- windows_server.dns.get_zones:
  load:
    windows_server: windows_server
  save: dns_zones

- windows_server.dns.output_zones_table:
    text: DNS Zones
  load:
    zones: dns_zones