effectivelywild.technitium_dns.technitium_dns_get_dhcp_scope module – Get DHCP scope details

Note

This module is part of the effectivelywild.technitium_dns collection (version 0.9.1).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install effectivelywild.technitium_dns.

To use it in a playbook, specify: effectivelywild.technitium_dns.technitium_dns_get_dhcp_scope.

New in effectivelywild.technitium_dns 0.6.0

Synopsis

  • Retrieve complete details of a DHCP scope configuration.

  • Returns all scope settings including lease times, DNS settings, exclusions, and reserved leases.

Parameters

Parameter

Comments

api_port

integer

Port for the Technitium DNS API. Defaults to 5380

Default: 5380

api_token

string / required

API token for authenticating with the Technitium DNS API

api_url

string / required

Base URL for the Technitium DNS API

name

string / required

The name of the DHCP scope to get details for

validate_certs

boolean

Whether to validate SSL certificates when making API requests

Choices:

  • false

  • true ← (default)

See Also

Examples

- name: Get Default DHCP scope details
  technitium_dns_get_dhcp_scope:
    api_url: "http://localhost"
    api_token: "myapitoken"
    name: "Default"
  register: result

- debug:
    var: result.scope_details

- name: Get details for a custom scope
  technitium_dns_get_dhcp_scope:
    api_url: "http://localhost"
    api_token: "myapitoken"
    name: "Guest Network"
  register: result

- debug:
    var: result.scope_details

Return Values

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

Key

Description

changed

boolean

Whether the module made changes (always false for get operations)

Returned: always

Sample: false

failed

boolean

Whether the module failed

Returned: always

Sample: false

scope_details

dictionary

Complete DHCP scope configuration details

Returned: always

allowOnlyReservedLeases

boolean

Whether to allow only reserved leases

Returned: always

Sample: false

blockLocallyAdministeredMacAddresses

boolean

Whether to block locally administered MAC addresses

Returned: always

Sample: false

bootFileName

string

Boot filename

Returned: when configured

Sample: "boot.bin"

capwapAcIpAddresses

list / elements=string

List of CAPWAP AC IP addresses

Returned: when configured

Sample: ["192.168.1.2"]

dnsServers

list / elements=string

List of DNS server addresses

Returned: always

Sample: ["192.168.1.5"]

dnsTtl

integer

DNS TTL in seconds

Returned: always

Sample: 900

dnsUpdates

boolean

Whether DNS updates are enabled

Returned: always

Sample: true

domainName

string

Domain name for the scope

Returned: always

Sample: "local"

domainSearchList

list / elements=string

List of domain search suffixes

Returned: when configured

Sample: ["home.arpa", "lan"]

endingAddress

string

Ending IP address of the DHCP scope

Returned: always

Sample: "192.168.1.254"

exclusions

list / elements=dictionary

List of IP address exclusions

Returned: always

Sample: [{"endingAddress": "192.168.1.10", "startingAddress": "192.168.1.1"}]

genericOptions

list / elements=dictionary

List of generic DHCP options

Returned: when configured

Sample: [{"code": 150, "value": "C0:A8:01:01"}]

ignoreClientIdentifierOption

boolean

Whether to ignore client identifier option

Returned: always

Sample: true

leaseTimeDays

integer

Lease time in days

Returned: always

Sample: 7

leaseTimeHours

integer

Lease time in hours

Returned: always

Sample: 0

leaseTimeMinutes

integer

Lease time in minutes

Returned: always

Sample: 0

name

string

Name of the DHCP scope

Returned: always

Sample: "Default"

ntpServers

list / elements=string

List of NTP server addresses

Returned: when configured

Sample: ["192.168.1.5"]

offerDelayTime

integer

Offer delay time in milliseconds

Returned: always

Sample: 0

pingCheckEnabled

boolean

Whether ping check is enabled

Returned: always

Sample: false

pingCheckRetries

integer

Number of ping check retries

Returned: always

Sample: 2

pingCheckTimeout

integer

Ping check timeout in milliseconds

Returned: always

Sample: 1000

reservedLeases

list / elements=dictionary

List of reserved leases

Returned: always

Sample: [{"address": "192.168.1.10", "comments": "comments", "hardwareAddress": "00-00-00-00-00-00", "hostName": null}]

routerAddress

string

Router/gateway address

Returned: always

Sample: "192.168.1.1"

serverAddress

string

DHCP server address

Returned: when configured

Sample: "192.168.1.1"

serverHostName

string

TFTP server hostname

Returned: when configured

Sample: "tftp-server-1"

startingAddress

string

Starting IP address of the DHCP scope

Returned: always

Sample: "192.168.1.1"

staticRoutes

list / elements=dictionary

List of static routes

Returned: when configured

Sample: [{"destination": "172.16.0.0", "router": "192.168.1.2", "subnetMask": "255.255.255.0"}]

subnetMask

string

Subnet mask for the DHCP scope

Returned: always

Sample: "255.255.255.0"

tftpServerAddresses

list / elements=string

List of TFTP server addresses

Returned: when configured

Sample: ["192.168.1.5", "192.168.1.6"]

useThisDnsServer

boolean

Whether to use this DNS server

Returned: always

Sample: false

vendorInfo

list / elements=dictionary

List of vendor-specific information

Returned: when configured

winsServers

list / elements=string

List of WINS server addresses

Returned: when configured

Sample: ["192.168.1.5"]

Authors

  • Frank Muise (@effectivelywild)