Access class variables the new way
Recent puppets demand that puppet class variables be qualified as instance members when accessed from within a template.
This commit is contained in:
parent
5f4e454ea6
commit
05097dcd05
@ -1,6 +1,6 @@
|
||||
|
||||
acl <%= name %> {
|
||||
<%- addresses.each do |address| -%>
|
||||
acl <%= @name %> {
|
||||
<%- @addresses.each do |address| -%>
|
||||
<%= address %>;
|
||||
<%- end -%>
|
||||
};
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
|
||||
key <%= name %> {
|
||||
algorithm <%= algorithm %>;
|
||||
secret "<%= secret %>";
|
||||
key <%= @name %> {
|
||||
algorithm <%= @algorithm %>;
|
||||
secret "<%= @secret %>";
|
||||
};
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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 -%>
|
||||
};
|
||||
|
||||
@ -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 -%>
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user