-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add response-policy to dns::view #252
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,14 @@ | |
# not to be unmanaged to be effective. | ||
# @param order | ||
# The order parameter to the concat fragment. | ||
# @param response_policy | ||
# Optional. An array of response policy configurations for the view in the | ||
# following format: | ||
# [{'zone' => '<ZONE_NAME>', 'policy' => '<POLICY_ACTION>', 'log' => true|false, | ||
# 'max_policy_ttl' => <TTL_VALUE>, 'cname_domain' => '<CNAME_DOMAIN>'}] | ||
# Example: [{'zone' => 'example.com', 'policy' => 'passthru', 'log' => true, | ||
# 'max_policy_ttl' => 3600}, {'zone' => 'example.net', | ||
# 'policy' => 'cname', 'cname_domain' => 'example.com'}] | ||
Comment on lines
+46
to
+48
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps add a full There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about this
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that's good, but There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, a brief description is important. Further, I would like to add multiple examples for separate use cases like below.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi, |
||
# | ||
define dns::view ( | ||
Array[String] $match_clients = [], | ||
|
@@ -57,6 +65,7 @@ | |
Boolean $include_localzones = true, | ||
Boolean $include_defaultzones = true, | ||
String $order = '-', | ||
Optional[Dns::ResponsePolicy] $response_policy = undef, | ||
) { | ||
unless $dns::enable_views { | ||
fail('Must set $dns::enable_views to true in order to use dns::view') | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
type Dns::ResponsePolicy = Array[ | ||
Struct[{ | ||
zone => Stdlib::Fqdn, | ||
policy => Optional[Enum[ | ||
'given', 'disabled', 'passthru', 'drop', | ||
'nxdomain', 'nodata', 'tcp-only', 'cname' | ||
]], | ||
cname_domain => Optional[Stdlib::Fqdn], | ||
max_policy_ttl => Optional[Integer[0]], | ||
log => Optional[Boolean] | ||
}], 1, 32 | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
puppet-strings should link to the type alias, so explaining the format is probably redundant.