diff --git a/README.md b/README.md index 234b8c9..b773809 100644 --- a/README.md +++ b/README.md @@ -209,3 +209,9 @@ disable_monitor Adds 'disable monitor' line - disables NTP Monlist command, useful to prevent NTP reflection attack https://isc.sans.edu/forums/diary/NTP+reflection+attack/17300 - *Default*: false + +interface +--------------- +Adds 'interface' line - interface configuration, see man ntp_misc + +- *Default*: 'UNSET' diff --git a/manifests/init.pp b/manifests/init.pp index befe888..46b0a01 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -40,6 +40,7 @@ $disable_monitor = true, $sysconfig_path = 'USE_DEFAULTS', $sysconfig_options = 'USE_DEFAULTS', + $interface = 'UNSET', ) { # validate type as array or fail diff --git a/templates/ntp.conf.erb b/templates/ntp.conf.erb index d1d3871..df1140b 100644 --- a/templates/ntp.conf.erb +++ b/templates/ntp.conf.erb @@ -32,7 +32,7 @@ filegen clockstats file clockstats type day enable # pool: <% @servers.each do |server| -%> -server <%= server %><% if @server_options != 'UNSET' %> <%= @server_options %><% end %> +server <%= server %><% if @server_options != 'UNSET' %> <% @server_options.each do |option| -%><%= option %><% end -%><% end %> <% end -%> <% if @my_peers != ['UNSET'] -%> @@ -116,3 +116,8 @@ tinker panic 0 # Disabling monitor - https://isc.sans.edu/diary/NTP+reflection+attack/17300 disable monitor <% end -%> + +<% if @interface != 'UNSET' %> +# Interface configuration <% @interface.each do |value| %> +interface <%= value %><% end %> +<% end %>