From 52ff81b7d0debb91f0aa86c5933aa90d5008ded5 Mon Sep 17 00:00:00 2001 From: Ashley Penney Date: Thu, 8 Aug 2013 09:55:32 -0700 Subject: Convert restrict to an array of restrictions. Instead of a boolean with hardcoded values we now just convert restrict into an array of lines related to restrictions. --- templates/ntp.conf.erb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'templates') diff --git a/templates/ntp.conf.erb b/templates/ntp.conf.erb index c0a821b..94b3675 100644 --- a/templates/ntp.conf.erb +++ b/templates/ntp.conf.erb @@ -6,13 +6,12 @@ tinker panic 0 <% end -%> -<% if @restrict -%> -# Permit time synchronization with our time source, but do not -# permit the source to query or modify the service on this system. -restrict default kod nomodify notrap nopeer noquery -restrict -6 default kod nomodify notrap nopeer noquery -restrict 127.0.0.1 -restrict -6 ::1 +<% if @restrict != [] -%> +# Permit time synchronization with our time source, but do not' +# permit the source to query or modify the service on this system.' +<% @restrict.flatten.each do |restrict| -%> +<%= restrict %> +<% end %> <% end -%> # Servers -- cgit v1.2.3