From 5ddbc13804b99120901fd08e7d735517ec7c3f50 Mon Sep 17 00:00:00 2001 From: Kenyon Ralph Date: Tue, 11 Jul 2023 21:49:36 -0700 Subject: [PATCH] Add Debian hiera data to match package defaults These settings match the current Debian package default chrony.conf: https://salsa.debian.org/debian/chrony/-/blob/0eae9a1cd2b03c2aaf1af32c7a0840351d9a91e7/debian/chrony.conf --- data/Debian.yaml | 5 +++++ spec/classes/chrony_spec.rb | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 data/Debian.yaml diff --git a/data/Debian.yaml b/data/Debian.yaml new file mode 100644 index 0000000..39b4292 --- /dev/null +++ b/data/Debian.yaml @@ -0,0 +1,5 @@ +chrony::driftfile: /var/lib/chrony/chrony.drift +chrony::leapsectz: right/UTC +chrony::makestep_seconds: 1 +chrony::maxupdateskew: 100.0 +chrony::ntsdumpdir: /var/lib/chrony diff --git a/spec/classes/chrony_spec.rb b/spec/classes/chrony_spec.rb index 16aed6b..3b3cdbd 100644 --- a/spec/classes/chrony_spec.rb +++ b/spec/classes/chrony_spec.rb @@ -118,8 +118,12 @@ ['0.pool.ntp.org', '1.pool.ntp.org', '2.pool.ntp.org', '3.pool.ntp.org'].each do |s| it { is_expected.to contain_file(config_file).with_content(%r{^\s*server #{s} iburst$}) } end - it { is_expected.to contain_file(config_file).with_content(%r{^\s*driftfile /var/lib/chrony/drift$}) } + it { is_expected.to contain_file(config_file).with_content(%r{^\s*driftfile /var/lib/chrony/chrony.drift$}) } it { is_expected.to contain_file(config_file).with_content(%r{^\s*rtcsync$}) } + it { is_expected.to contain_file(config_file).with_content(%r{^\s*leapsectz right/UTC$}) } + it { is_expected.to contain_file(config_file).with_content(%r{^\s*makestep 1 3$}) } + it { is_expected.to contain_file(config_file).with_content(%r{^\s*maxupdateskew 100.0$}) } + it { is_expected.to contain_file(config_file).with_content(%r{^\s*ntsdumpdir /var/lib/chrony$}) } it { is_expected.to contain_file(config_file).without_content(%r{^\s*dumpdir}) } it { is_expected.to contain_file(config_file).without_content(%r{^\s*ntpsigndsocket}) } it { is_expected.to contain_file(config_file).without_content(%r{^\s*\n\s*$}) }