This repository has been archived by the owner on Sep 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
start knot2 compatibility work. refs #3
- Loading branch information
Showing
5 changed files
with
35 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,28 @@ | ||
# THIS CONFIGURATION IS MANAGED BY PUPPET | ||
# see man 5 knot.conf for all available configuration options | ||
system { | ||
user <%= @service_user %>.<%= @service_group %>; | ||
<%- @system.each do |k,v| -%> | ||
<%= k %> <%= v %>; | ||
<%- end -%> | ||
} | ||
<%- require 'yaml' -%> | ||
|
||
<%- if @keys -%> | ||
keys { | ||
<%- @keys.each do |k,v| -%> | ||
<%= k %> <%= v['algorithm'] %> "<%= v['key'] %>"; | ||
<%- end -%> | ||
} | ||
<%- end -%> | ||
server: | ||
user: <%= @service_user %>:<%= @service_group %> | ||
<%- @system.each do |k,v| -%> | ||
<%= k %>: <%= v %> | ||
<%- end -%> | ||
<%- @interfaces.each do |k,v| -%> | ||
listen: <%= v['address'] %>@<%= v['port'] %> | ||
<%- end -%> | ||
|
||
interfaces { | ||
<%- @interfaces.each do |k,v| -%> | ||
<%= k -%> { | ||
<%- v.each do |y,z| -%> | ||
<%= y %> <%= z %>; | ||
<%- end -%> | ||
} | ||
<%- end -%> | ||
} | ||
|
||
<%- if @remotes -%> | ||
remotes { | ||
<%- @remotes.each do |k,v| -%> | ||
<%= k -%> { | ||
<%- v.each do |y,z| -%> | ||
<%= y %> <%= z %>; | ||
<%- end -%> | ||
} | ||
<%- end -%> | ||
} | ||
<%- end -%> | ||
log: | ||
<%- @log.each do |k,v| -%> | ||
- target: <%= k -%> | ||
|
||
<%- if @groups -%> | ||
groups { | ||
<%- @groups.each do |k,v| -%> | ||
<%= k %> { <%= v %> } | ||
<%- end -%> | ||
} | ||
<%- v.each do |y,z| -%> | ||
<%= y %>: <%= z %> | ||
<%- end -%> | ||
<%- end -%> | ||
|
||
control { | ||
control: | ||
<%- @control.each do |k,v| -%> | ||
<%= k %> <%= v %>; | ||
<%- end -%> | ||
} | ||
|
||
zones { | ||
storage "<%= @zone_storage %>"; | ||
<%- if @dnssec_enable -%> | ||
dnssec-enable on; | ||
dnssec-keydir "<%= @dnssec_keydir %>"; | ||
<%= k %>: <%= v %> | ||
<%- end -%> | ||
<%- if @zone_options then @zone_options.each do |k,v| -%> | ||
<%= k %> <%= v %>; | ||
<%- end end -%> | ||
include "<%= @zones_file %>"; | ||
} | ||
|
||
log { | ||
<%- @log.each do |k,v| -%> | ||
<%= k -%> { | ||
<%- v.each do |y,z| -%> | ||
<%= y %> <%= z %>; | ||
<%- end -%> | ||
} | ||
<%- end -%> | ||
} | ||
include: "<%= @zones_config_file %>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
# THIS CONFIGURATION IS MANAGED BY PUPPET | ||
# see man 5 knot.conf for all available configuration options | ||
<%- @zones.each do |k,v| -%> | ||
<%= k -%> { | ||
file "<%= k.gsub(/\//, "_") -%>.zone"; | ||
<%- if (@zone_defaults && v && v.length > 0) then _v = @zone_defaults.merge(v) -%> | ||
<%- elsif (v && v.length > 0) then _v = v -%> | ||
<%- elsif (@zone_defaults && @zone_defaults.length > 0) then _v = @zone_defaults -%> | ||
<%- end -%> | ||
<%- if (_v && _v.length > 0) then _v.each do |y,z| -%> | ||
<%= y %> <%= z %>; | ||
<%- end end -%> | ||
} | ||
|
||
zone: | ||
<%- @zones.each do |k,v| -%> | ||
- domain: <%= k -%> | ||
file: "<%= k -%>.zone" | ||
<%- if (@zone_defaults && v && v.length > 0) then _v = @zone_defaults.merge(v) -%> | ||
<%- elsif (v && v.length > 0) then _v = v -%> | ||
<%- elsif (@zone_defaults && @zone_defaults.length > 0) then _v = @zone_defaults -%> | ||
<%- end -%> | ||
<%- if (_v && _v.length > 0) then _v.each do |y,z| -%> | ||
<%= y %>: <%= z %> | ||
<%- end end -%> | ||
<%- end -%> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters