diff --git a/templates/acl.erb b/templates/acl.erb index 6b41815..139b46d 100644 --- a/templates/acl.erb +++ b/templates/acl.erb @@ -1,6 +1,6 @@ -acl <%= name %> { -<%- addresses.each do |address| -%> +acl <%= @name %> { +<%- @addresses.each do |address| -%> <%= address %>; <%- end -%> }; diff --git a/templates/key.conf.erb b/templates/key.conf.erb index 117ba82..2db293f 100644 --- a/templates/key.conf.erb +++ b/templates/key.conf.erb @@ -1,5 +1,5 @@ -key <%= name %> { - algorithm <%= algorithm %>; - secret "<%= secret %>"; +key <%= @name %> { + algorithm <%= @algorithm %>; + secret "<%= @secret %>"; }; diff --git a/templates/named.conf.erb b/templates/named.conf.erb index 19aae15..37b01f0 100644 --- a/templates/named.conf.erb +++ b/templates/named.conf.erb @@ -1,25 +1,25 @@ # This file is managed by puppet - changes will be lost -include "<%= confdir %>/acls.conf"; -include "<%= confdir %>/keys.conf"; -include "<%= confdir %>/views.conf"; +include "<%= @confdir %>/acls.conf"; +include "<%= @confdir %>/keys.conf"; +include "<%= @confdir %>/views.conf"; options { - directory "<%= cachedir %>"; -<%- if not forwarders.empty? -%> + directory "<%= @cachedir %>"; +<%- if not @forwarders.empty? -%> forwarders { -<%- forwarders.each do |forwarder| -%> +<%- @forwarders.each do |forwarder| -%> <%= forwarder %>; <%- end -%> }; <%- end -%> - auth-nxdomain <%= auth_nxdomain ? 'yes' : 'no' %>; + auth-nxdomain <%= @auth_nxdomain ? 'yes' : 'no' %>; listen-on-v6 { any; }; - dnssec-enable <%= dnssec ? 'yes' : 'no' %>; - dnssec-validation <%= dnssec ? 'yes' : 'no' %>; - dnssec-lookaside <%= dnssec ? 'auto' : 'no' %>; -<%- if version != '' -%> - version "<%= version %>"; + dnssec-enable <%= @dnssec ? 'yes' : 'no' %>; + dnssec-validation <%= @dnssec ? 'yes' : 'no' %>; + dnssec-lookaside <%= @dnssec ? 'auto' : 'no' %>; +<%- if @version != '' -%> + version "<%= @version %>"; <%- end -%> }; -include "<%= confdir %>/named.conf.local"; +include "<%= @confdir %>/named.conf.local"; diff --git a/templates/view.erb b/templates/view.erb index 75b5a28..b12c611 100644 --- a/templates/view.erb +++ b/templates/view.erb @@ -1,25 +1,25 @@ -view "<%= name %>" { -<%- if not match_clients.empty? -%> +view "<%= @name %>" { +<%- if not @match_clients.empty? -%> match-clients { -<%- match_clients.each do |match_client| -%> +<%- @match_clients.each do |match_client| -%> <%= match_client %>; <%- end -%> }; <%- end -%> -<%- if not match_destinations.empty? -%> +<%- if not @match_destinations.empty? -%> match-destinations { -<%- match_destinations.each do |match_destination| -%> +<%- @match_destinations.each do |match_destination| -%> <%= match_destination %>; <%- end -%> }; <%- end -%> - recursion <%= recursion ? 'yes' : 'no' %>; + recursion <%= @recursion ? 'yes' : 'no' %>; <%- if scope.lookupvar('osfamily') == 'Debian' -%> - include "<%= confdir %>/named.conf.default-zones"; + include "<%= @confdir %>/named.conf.default-zones"; <%- end -%> -<%- zones.each do |zone| -%> - include "<%= confdir %>/zones/<%= zone %>.conf"; +<%- @zones.each do |zone| -%> + include "<%= @confdir %>/zones/<%= @zone %>.conf"; <%- end -%> }; diff --git a/templates/zone.conf.erb b/templates/zone.conf.erb index 1c5dd2b..3cfb3fa 100644 --- a/templates/zone.conf.erb +++ b/templates/zone.conf.erb @@ -1,62 +1,62 @@ # This file managed by puppet - changes will be lost -zone "<%= _domain %>" { - type <%= zone_type %>; -<%- if has_zone_file -%> -<%- if dnssec -%> +zone "<%= @_domain %>" { + type <%= @zone_type %>; +<%- if @has_zone_file -%> +<%- if @dnssec -%> auto-dnssec maintain; -<%- if key_directory == '' -%> - key-directory "<%= cachedir %>/<%= name %>"; +<%- if @key_directory == '' -%> + key-directory "<%= @cachedir %>/<%= @name %>"; <%- else -%> - key-directory "<%= key_directory %>"; + key-directory "<%= @key_directory %>"; <%- end -%> - file "<%= cachedir %>/<%= name %>/<%= _domain %>.signed"; + file "<%= @cachedir %>/<%= @name %>/<%= @_domain %>.signed"; <%- else -%> - file "<%= cachedir %>/<%= name %>/<%= _domain %>"; + file "<%= @cachedir %>/<%= @name %>/<%= @_domain %>"; <%- end -%> - notify <%= ns_notify ? 'yes' : 'no' %>; -<%- if not also_notify.empty? -%> + notify <%= @ns_notify ? 'yes' : 'no' %>; +<%- if not @also_notify.empty? -%> also-notify { -<%- also_notify.each do |server| -%> +<%- @also_notify.each do |server| -%> <%= server %>; <%- end -%> }; <%- end -%> -<%- if not allow_notify.empty? -%> +<%- if not @allow_notify.empty? -%> allow-notify { -<%- allow_notify.each do |server| -%> +<%- @allow_notify.each do |server| -%> <%= server %>; <%- end -%> }; <%- end -%> <%- end -%> -<%- if not masters.empty? -%> +<%- if not @masters.empty? -%> masters { -<%- masters.each do |master| -%> +<%- @masters.each do |master| -%> <%= master %>; <%- end -%> }; <%- end -%> -<%- if not allow_updates.empty? -%> +<%- if not @allow_updates.empty? -%> allow-update { -<%- allow_updates.each do |allow_update| -%> +<%- @allow_updates.each do |allow_update| -%> <%= allow_update %>; <%- end -%> }; <%- end -%> -<%- if not allow_transfers.empty? -%> +<%- if not @allow_transfers.empty? -%> allow-transfer { -<%- allow_transfers.each do |allow_transfer| -%> +<%- @allow_transfers.each do |allow_transfer| -%> <%= allow_transfer %>; <%- end -%> }; <%- end -%> -<%- if forward != '' -%> - forward <%= forward %>; +<%- if @forward != '' -%> + forward <%= @forward %>; <%- end -%> -<%- if not forwarders.empty? -%> +<%- if not @forwarders.empty? -%> forwarders { -<%- forwarders.each do |forwarder| -%> +<%- @forwarders.each do |forwarder| -%> <%= forwarder %>; <%- end -%> };