Skip to content

Commit

Permalink
zone allow auto plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
othalla committed Apr 29, 2019
1 parent f9c67c2 commit 4ebf1e1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions manifests/zone.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,19 @@
Boolean $forward = false,
String $forward_from = '.',
Optional[Array[String]] $forward_to = undef,
Optional[String] $auto = undef,
Optional[Hash] $auto_config = undef,
) {
if $forward {
if $forward_to == undef {
fail('coredns: forward_to must be set')
}
}
if $auto {
if $auto_config == undef {
fail('coredns: auto_config must be set')
}
}
include ::coredns
concat::fragment{ "Corefile-${title}":
target => "${coredns::config_dir}/Corefile",
Expand Down
7 changes: 7 additions & 0 deletions templates/Corefile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
<%- end %>
<%- end -%>
<%- end -%>
<% if @auto -%>
auto <%= @auto -%> {
<%- @auto_config.each do |key, value| -%>
<%= key %> <%= value %>
<%- end -%>
}
<%- end -%>
<%- if @log -%>
log
<%- end -%>
Expand Down

0 comments on commit 4ebf1e1

Please sign in to comment.