effectivelywild.technitium_dns.technitium_dns_set_dhcp_scope module – Set DHCP scope configuration
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_set_dhcp_scope.
New in effectivelywild.technitium_dns 0.6.0
Synopsis
Set or create DHCP scope configuration.
If the scope does not exist, it will be created.
Parameters
Parameter |
Comments |
|---|---|
Stop dynamic IP address allocation and allocate only reserved IP addresses Choices:
|
|
Port for the Technitium DNS API. Defaults to 5380 Default: |
|
API token for authenticating with the Technitium DNS API |
|
Base URL for the Technitium DNS API |
|
Stop dynamic IP address allocation for clients with locally administered MAC addresses Choices:
|
|
The boot file name stored on the bootstrap TFTP server to be used by clients |
|
List of CAPWAP Access Controller IP addresses for Wireless Termination Points |
|
List of DNS server IP addresses to be used by the clients Ignored when useThisDnsServer is set to true |
|
The TTL value in seconds used for forward and reverse DNS records |
|
Allow the DHCP server to automatically update forward and reverse DNS entries for clients Choices:
|
|
The domain name to be used by this network The DHCP server automatically adds forward and reverse DNS entries when configured |
|
List of domain names that clients can use as a suffix when searching a domain name |
|
The ending IP address of the DHCP scope Required when creating a new scope |
|
List of IP address ranges to exclude from dynamic allocation |
|
Ending IP address of exclusion range |
|
Starting IP address of exclusion range |
|
List of generic DHCP options not directly supported |
|
DHCP option code |
|
Option value as colon-separated or normal hex string |
|
Always use the client’s MAC address as the identifier instead of Client Identifier option Choices:
|
|
The lease time in number of days |
|
The lease time in number of hours |
|
The lease time in number of minutes |
|
The name of the DHCP scope |
|
The new name of the DHCP scope to rename an existing scope |
|
List of NTP server domain names that the DHCP server should automatically resolve |
|
List of Network Time Protocol (NTP) server IP addresses to be used by the clients |
|
The time duration in milliseconds that the DHCP server delays sending an DHCPOFFER message |
|
Allow the DHCP server to check if an IP address is already in use to prevent IP address conflicts Choices:
|
|
The maximum number of ping requests to try |
|
The timeout interval in milliseconds to wait for a ping reply |
|
List of reserved IP addresses to assign to specific clients |
|
Reserved IP address |
|
Comments for this reservation |
|
MAC address of the client |
|
Host name for the reserved lease |
|
The default gateway IP address to be used by the clients |
|
The IP address of next server (TFTP) to use in bootstrap by the clients If not specified, the DHCP server’s IP address is used |
|
The optional bootstrap server host name to be used by clients to identify the TFTP server |
|
The starting IP address of the DHCP scope Required when creating a new scope |
|
List of static routes for clients |
|
Destination network address |
|
Router/gateway address for this route |
|
Subnet mask for the destination |
|
The subnet mask of the network Required when creating a new scope |
|
List of TFTP Server addresses or VoIP Configuration Server addresses |
|
Use this DNS server’s IP address to configure the DNS Servers DHCP option for clients Choices:
|
|
Whether to validate SSL certificates when making API requests Choices:
|
|
List of vendor information entries |
|
Vendor class identifier |
|
Vendor specific information as colon-separated or normal hex string |
|
List of NBNS/WINS server IP addresses to be used by the clients |
See Also
See also
- effectivelywild.technitium_dns.technitium_dns_list_dhcp_scopes
List all DHCP scopes
- effectivelywild.technitium_dns.technitium_dns_get_dhcp_scope
Get DHCP scope details
- effectivelywild.technitium_dns.technitium_dns_enable_dhcp_scope
Enable a DHCP scope
- effectivelywild.technitium_dns.technitium_dns_disable_dhcp_scope
Disable a DHCP scope
- effectivelywild.technitium_dns.technitium_dns_delete_dhcp_scope
Delete a DHCP scope
Examples
- name: Create a new DHCP scope
technitium_dns_set_dhcp_scope:
api_url: "http://localhost"
api_token: "myapitoken"
name: "Office Network"
startingAddress: "10.0.1.1"
endingAddress: "10.0.1.254"
subnetMask: "255.255.255.0"
routerAddress: "10.0.1.1"
leaseTimeDays: 7
- name: Update existing scope with DNS settings
technitium_dns_set_dhcp_scope:
api_url: "http://localhost"
api_token: "myapitoken"
name: "Office Network"
domainName: "office.local"
useThisDnsServer: true
dnsUpdates: true
dnsTtl: 900
- name: Configure scope with exclusions and reserved leases
technitium_dns_set_dhcp_scope:
api_url: "http://localhost"
api_token: "myapitoken"
name: "Office Network"
exclusions:
- startingAddress: "10.0.1.1"
endingAddress: "10.0.1.10"
reservedLeases:
- hostName: "printer"
hardwareAddress: "00-11-22-33-44-55"
address: "10.0.1.100"
comments: "Office printer"
- name: Rename a scope
technitium_dns_set_dhcp_scope:
api_url: "http://localhost"
api_token: "myapitoken"
name: "Office Network"
newName: "Main Office Network"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Complete raw API response from Technitium DNS Returned: always |
|
Response data from the API Returned: always |
|
API response status Returned: always Sample: |
|
Whether the module made changes Returned: always Sample: |
|
Dictionary showing what changed, with current and desired values Returned: when changes are made Sample: |
|
Whether the module failed Returned: always Sample: |
|
Human readable message describing the result Returned: always Sample: |