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 %> {
|
acl <%= @name %> {
|
||||||
<%- addresses.each do |address| -%>
|
<%- @addresses.each do |address| -%>
|
||||||
<%= address %>;
|
<%= address %>;
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
key <%= name %> {
|
key <%= @name %> {
|
||||||
algorithm <%= algorithm %>;
|
algorithm <%= @algorithm %>;
|
||||||
secret "<%= secret %>";
|
secret "<%= @secret %>";
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,25 +1,25 @@
|
|||||||
# This file is managed by puppet - changes will be lost
|
# This file is managed by puppet - changes will be lost
|
||||||
include "<%= confdir %>/acls.conf";
|
include "<%= @confdir %>/acls.conf";
|
||||||
include "<%= confdir %>/keys.conf";
|
include "<%= @confdir %>/keys.conf";
|
||||||
include "<%= confdir %>/views.conf";
|
include "<%= @confdir %>/views.conf";
|
||||||
|
|
||||||
options {
|
options {
|
||||||
directory "<%= cachedir %>";
|
directory "<%= @cachedir %>";
|
||||||
<%- if not forwarders.empty? -%>
|
<%- if not @forwarders.empty? -%>
|
||||||
forwarders {
|
forwarders {
|
||||||
<%- forwarders.each do |forwarder| -%>
|
<%- @forwarders.each do |forwarder| -%>
|
||||||
<%= forwarder %>;
|
<%= forwarder %>;
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
};
|
};
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
auth-nxdomain <%= auth_nxdomain ? 'yes' : 'no' %>;
|
auth-nxdomain <%= @auth_nxdomain ? 'yes' : 'no' %>;
|
||||||
listen-on-v6 { any; };
|
listen-on-v6 { any; };
|
||||||
dnssec-enable <%= dnssec ? 'yes' : 'no' %>;
|
dnssec-enable <%= @dnssec ? 'yes' : 'no' %>;
|
||||||
dnssec-validation <%= dnssec ? 'yes' : 'no' %>;
|
dnssec-validation <%= @dnssec ? 'yes' : 'no' %>;
|
||||||
dnssec-lookaside <%= dnssec ? 'auto' : 'no' %>;
|
dnssec-lookaside <%= @dnssec ? 'auto' : 'no' %>;
|
||||||
<%- if version != '' -%>
|
<%- if @version != '' -%>
|
||||||
version "<%= version %>";
|
version "<%= @version %>";
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
};
|
};
|
||||||
|
|
||||||
include "<%= confdir %>/named.conf.local";
|
include "<%= @confdir %>/named.conf.local";
|
||||||
|
|||||||
@ -1,25 +1,25 @@
|
|||||||
|
|
||||||
view "<%= name %>" {
|
view "<%= @name %>" {
|
||||||
<%- if not match_clients.empty? -%>
|
<%- if not @match_clients.empty? -%>
|
||||||
match-clients {
|
match-clients {
|
||||||
<%- match_clients.each do |match_client| -%>
|
<%- @match_clients.each do |match_client| -%>
|
||||||
<%= match_client %>;
|
<%= match_client %>;
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
};
|
};
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if not match_destinations.empty? -%>
|
<%- if not @match_destinations.empty? -%>
|
||||||
match-destinations {
|
match-destinations {
|
||||||
<%- match_destinations.each do |match_destination| -%>
|
<%- @match_destinations.each do |match_destination| -%>
|
||||||
<%= match_destination %>;
|
<%= match_destination %>;
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
};
|
};
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
recursion <%= recursion ? 'yes' : 'no' %>;
|
recursion <%= @recursion ? 'yes' : 'no' %>;
|
||||||
<%- if scope.lookupvar('osfamily') == 'Debian' -%>
|
<%- if scope.lookupvar('osfamily') == 'Debian' -%>
|
||||||
include "<%= confdir %>/named.conf.default-zones";
|
include "<%= @confdir %>/named.conf.default-zones";
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
|
|
||||||
<%- zones.each do |zone| -%>
|
<%- @zones.each do |zone| -%>
|
||||||
include "<%= confdir %>/zones/<%= zone %>.conf";
|
include "<%= @confdir %>/zones/<%= @zone %>.conf";
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,62 +1,62 @@
|
|||||||
|
|
||||||
# This file managed by puppet - changes will be lost
|
# This file managed by puppet - changes will be lost
|
||||||
zone "<%= _domain %>" {
|
zone "<%= @_domain %>" {
|
||||||
type <%= zone_type %>;
|
type <%= @zone_type %>;
|
||||||
<%- if has_zone_file -%>
|
<%- if @has_zone_file -%>
|
||||||
<%- if dnssec -%>
|
<%- if @dnssec -%>
|
||||||
auto-dnssec maintain;
|
auto-dnssec maintain;
|
||||||
<%- if key_directory == '' -%>
|
<%- if @key_directory == '' -%>
|
||||||
key-directory "<%= cachedir %>/<%= name %>";
|
key-directory "<%= @cachedir %>/<%= @name %>";
|
||||||
<%- else -%>
|
<%- else -%>
|
||||||
key-directory "<%= key_directory %>";
|
key-directory "<%= @key_directory %>";
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
file "<%= cachedir %>/<%= name %>/<%= _domain %>.signed";
|
file "<%= @cachedir %>/<%= @name %>/<%= @_domain %>.signed";
|
||||||
<%- else -%>
|
<%- else -%>
|
||||||
file "<%= cachedir %>/<%= name %>/<%= _domain %>";
|
file "<%= @cachedir %>/<%= @name %>/<%= @_domain %>";
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
notify <%= ns_notify ? 'yes' : 'no' %>;
|
notify <%= @ns_notify ? 'yes' : 'no' %>;
|
||||||
<%- if not also_notify.empty? -%>
|
<%- if not @also_notify.empty? -%>
|
||||||
also-notify {
|
also-notify {
|
||||||
<%- also_notify.each do |server| -%>
|
<%- @also_notify.each do |server| -%>
|
||||||
<%= server %>;
|
<%= server %>;
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
};
|
};
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if not allow_notify.empty? -%>
|
<%- if not @allow_notify.empty? -%>
|
||||||
allow-notify {
|
allow-notify {
|
||||||
<%- allow_notify.each do |server| -%>
|
<%- @allow_notify.each do |server| -%>
|
||||||
<%= server %>;
|
<%= server %>;
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
};
|
};
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if not masters.empty? -%>
|
<%- if not @masters.empty? -%>
|
||||||
masters {
|
masters {
|
||||||
<%- masters.each do |master| -%>
|
<%- @masters.each do |master| -%>
|
||||||
<%= master %>;
|
<%= master %>;
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
};
|
};
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if not allow_updates.empty? -%>
|
<%- if not @allow_updates.empty? -%>
|
||||||
allow-update {
|
allow-update {
|
||||||
<%- allow_updates.each do |allow_update| -%>
|
<%- @allow_updates.each do |allow_update| -%>
|
||||||
<%= allow_update %>;
|
<%= allow_update %>;
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
};
|
};
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if not allow_transfers.empty? -%>
|
<%- if not @allow_transfers.empty? -%>
|
||||||
allow-transfer {
|
allow-transfer {
|
||||||
<%- allow_transfers.each do |allow_transfer| -%>
|
<%- @allow_transfers.each do |allow_transfer| -%>
|
||||||
<%= allow_transfer %>;
|
<%= allow_transfer %>;
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
};
|
};
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if forward != '' -%>
|
<%- if @forward != '' -%>
|
||||||
forward <%= forward %>;
|
forward <%= @forward %>;
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if not forwarders.empty? -%>
|
<%- if not @forwarders.empty? -%>
|
||||||
forwarders {
|
forwarders {
|
||||||
<%- forwarders.each do |forwarder| -%>
|
<%- @forwarders.each do |forwarder| -%>
|
||||||
<%= forwarder %>;
|
<%= forwarder %>;
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user