diff --git a/spec/defines/dns_zone_spec.rb b/spec/defines/dns_zone_spec.rb index a4be17e9..25db7b5a 100644 --- a/spec/defines/dns_zone_spec.rb +++ b/spec/defines/dns_zone_spec.rb @@ -398,21 +398,6 @@ ]) end end - - context 'update_policy set to none' do - let(:params) { { - :update_policy => 'none', - } } - - it "should have valid zone configuration" do - verify_concat_fragment_exact_contents(catalogue, 'dns_zones+10__GLOBAL__example.com.dns', [ - 'zone "example.com" {', - ' type master;', - " file \"#{zonefilepath}/db.example.com\";", - '};', - ]) - end - end end end end diff --git a/templates/named.zone.erb b/templates/named.zone.erb index 3387442a..80cfbfaa 100644 --- a/templates/named.zone.erb +++ b/templates/named.zone.erb @@ -11,10 +11,8 @@ zone "<%= @zone %>" { <% end -%> <% if @zonetype == 'master' -%> <% if @update_policy.is_a? String -%> -<% if @update_policy != 'none' -%> update-policy <%= @update_policy %>; -<% end -%> -<% else -%> +<% elsif @update_policy -%> update-policy { <%- @update_policy.sort_by {|k, v| k}.each do |key, key_hash| -%> <%= key_hash['action'] || 'grant' %> <%= key %> <%= key_hash['matchtype'] %> <% if key_hash['tname'] %><%= key_hash['tname'] %> <% end %><%= key_hash['rr'] %>; diff --git a/types/updatepolicy.pp b/types/updatepolicy.pp index 6be6c8fb..62376c8d 100644 --- a/types/updatepolicy.pp +++ b/types/updatepolicy.pp @@ -1,6 +1,6 @@ # Validate update-policy parameter type Dns::UpdatePolicy = Variant[ - Enum['none', 'local'], + Enum['local'], Hash[ String, Struct[{