diff --git a/CHANGELOG.md b/CHANGELOG.md index c54f134c..cb81e289 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ This file is used to list changes made in each version of the ntp cookbook. ## Unreleased +- Remove local clock feature, this is no longer recommended + ## 4.0.0 - *2023-02-16* Remove Delivery diff --git a/README.md b/README.md index 8cbf5059..d7d69f60 100644 --- a/README.md +++ b/README.md @@ -250,11 +250,6 @@ These attributes are set based on platform / system information provided by Ohai - Defaults to false and will make no provisions for apparmor. - If a platform has apparmor enabled (currently Ubuntu) default will become true. -- `ntp['use_cmos']` - - - Boolean, uses a high stratum undisciplined clock for machines with real CMOS clock. - - Defaults to true unless a platform appears to be virtualized according to Ohai. - - `ntp['pkg_source']` - _Only applicable to Solaris 10_ - String, device/path to Solaris packages. diff --git a/attributes/default.rb b/attributes/default.rb index 024ea4b3..3f2f6870 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -133,6 +133,5 @@ default['ntp']['var_owner'] = 'root' end -default['ntp']['use_cmos'] = !node['virtualization'] || node['virtualization']['role'] != 'guest' ? true : false default['ntp']['leapfile_url'] = 'ntp.leapseconds' default['ntp']['leapfile_from_mirror'] = false diff --git a/spec/unit/recipes/default_spec.rb b/spec/unit/recipes/default_spec.rb index 3e1cae27..35b3e5bf 100644 --- a/spec/unit/recipes/default_spec.rb +++ b/spec/unit/recipes/default_spec.rb @@ -86,7 +86,6 @@ cached(:chef_run) do runner = ChefSpec::SoloRunner.new(platform: 'ubuntu', version: '16.04') runner.node.override['ntp']['pools'] = %w(0.pool.ntp.org 1.pool.ntp.org) - runner.node.override['ntp']['use_cmos'] = false runner.converge('ntp::default') end diff --git a/templates/ntp.conf.erb b/templates/ntp.conf.erb index 4b084dc8..9c44736a 100644 --- a/templates/ntp.conf.erb +++ b/templates/ntp.conf.erb @@ -90,13 +90,6 @@ restrict -6 ::1<%if node['ntp']['localhost']['noquery'] -%> noquery<% end -%> <% end -%> <% end -%> -<%# It is best practice to use a high stratum undisciplined clock, if you have a real CMOS clock %> -<%# Except cases where you have a low stratum server, or a virtualized system without a real CMOS clock %> -<% if node['ntp']['use_cmos'] -%> -<% -%>server 127.127.1.0 # local clock -<% -%>fudge 127.127.1.0 stratum 10 -<% end -%> - <% if node['ntp']['orphan']['enabled'] -%> tos orphan <%= node['ntp']['orphan']['stratum'] %> <% end -%>