Version information
This version is compatible with:
- Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x
- Puppet >= 5.5.18 < 8.0.0
Start using this module
Add this module to your Puppetfile:
mod 'arden-win_dns_server', '0.1.0'
Learn more about managing modules with a PuppetfileDocumentation
win_dns_server
Table of Contents
- Description
- Setup - The basics of getting started with win_dns_server
- Usage
- Limitations
- Development - Guide for contributing to the module
Description
This module provides a basic method to manage the configuration of the DNS server feature on a Windows server instance. While much of the configuration is accomplished via PowerShell DSC it was necessary to implement a new wrapper for the currently unsupported Conditional Forwarder Zone types.
Setup
Setup Requirements
Pluginsync should be enabled. Additionally, you'll need to perform the configuration steps detailed for the DSC, pwshlib, and the resource_api module.
Beginning with win_dns_server
The following example will configure the DNS service, perform some basic global settings, and create two forwarder zones.
win_dns_server::hash_server_settings:
debug_log_path: 'C:\temp\dns_debug.log'
disable_recursion: false
round_robin_responses: true
win_dns_server::array_publish_addresses:
- '10.100.100.10'
- '10.200.100.10'
win_dns_server::hash_forwarder_zones:
'10.in-addr.arpa':
master_servers:
- '172.17.100.10'
- '172.17.100.11'
use_recursion: false
Limitations
Currently AD backed DNS servers are only supported in a limited form. You should not try to create conditional forwarder zones on them!
Also, if the target zone already exists but is of the incorrect type things will go sideways. This is poorly tested at the moment, however, I believe the command will silently fail to create the target zone.
Development
Make a pull request and we'll figure it out!
Reference
Table of Contents
Classes
win_dns_server
: Configures the Windows DNS Server service on a given node.win_dns_server::config
: Performs zone creation and update operations. Internal classwin_dns_server::install
: Adds the Windows DNS Server featurewin_dns_server::service
: Internal class which configures the DNS service
Resource types
Data types
Win_dns_server::ConditionalForwarderZone
: Parameters for the conditional_forwarder_zone typeWin_dns_server::Settings
: Global dns server settings
Classes
win_dns_server
Configures the Windows DNS Server service on a given node.
Parameters
The following parameters are available in the win_dns_server
class:
hash_server_settings
Data type: Win_dns_server::Settings
THis hash configures global DNS service settings when specified. These settings are derived from the xDnsServer module
array_publish_addresses
Data type: Optional[Array[Stdlib::IP::Address::V4::Nosubnet]]
Optional array listing the addresses this DNS server should self publish. By default the DNS server will publish only it's primary IP.
Default value: []
hash_forwarder_zones
Data type: Optional[Hash[Stdlib::Fqdn,Win_dns_server::ConditionalForwarderZone]]
A hash detailing the conditional forwarding DNS zones which will be created on this server. Note that the key to the hash is used as the zone name and must be specified.
Default value: {}
win_dns_server::config
Performs zone creation and update operations. Internal class
Parameters
The following parameters are available in the win_dns_server::config
class:
array_publish_addresses
Data type: Array[Stdlib::IP::Address::V4::Nosubnet]
See main class documentation.
Default value: $win_dns_server::array_publish_addresses
hash_server_settings
Data type: Win_dns_server::Settings
Default value: $win_dns_server::hash_server_settings
hash_forwarder_zones
Data type: Hash[Stdlib::Fqdn,Win_dns_server::ConditionalForwarderZone]
Default value: $win_dns_server::hash_forwarder_zones
win_dns_server::install
Adds the Windows DNS Server feature
win_dns_server::service
Internal class which configures the DNS service
Resource types
conditional_forwarder_zone
The conditional_forwarder_zone type.
Properties
The following properties are available in the conditional_forwarder_zone
type.
ensure
Data type: Enum[present, absent]
Whether this conditional forwarder zone should be presesnt or absent on the target node.
forwarder_timeout
Data type: Integer[0,15]
The the maximum amount of time, in seconds, that this server will wait for a response from one of the forwarder targets.
Default value: 3
master_servers
Data type: Array[Pattern[/\A([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}\z/]]
*this data type contains a regex that may not be accurately reflected in generated documentation
An array of servers which are authoratative for this DNS zone. These must be specificed by IP.
use_recursion
Data type: Boolean
When true the DNS server will perform recursive queries to resolve names in this zone if it does not receive a response before the forward timeout.
Default value: false
Parameters
The following parameters are available in the conditional_forwarder_zone
type.
name
namevar
Data type: Pattern[/\A(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])\z/]
*this data type contains a regex that may not be accurately reflected in generated documentation
The fully qualified DNS zone name. This includes both forward lookup zones like 'example.org' and reverse lookup zones like '48.0.10.in-addr.arpa'
Data types
Win_dns_server::ConditionalForwarderZone
Parameters for the conditional_forwarder_zone type
Alias of
Struct[=>]
Win_dns_server::Settings
Global dns server settings
Alias of
Struct[=>]
Dependencies
- puppetlabs/stdlib (>= 4.25.1 < 7.0.0)
- puppetlabs/dsc (>= 1.9.4 < 2.0.0)
- puppetlabs/pwshlib (>= 0.8.0 < 1.0.0)
- puppetlabs/resource_api (>= 1.1.0 < 2.0.0)
- puppet/windowsfeature (>= 3.2.2 < 4.0.0)