|
|
|
|
|
|
|
|
keyfile = 'keyfile ' |
|
|
keyfile = 'keyfile ' |
|
|
driftfile = '/var/lib/chrony/' |
|
|
driftfile = '/var/lib/chrony/' |
|
|
logdir = 'logdir /var/log/chrony' |
|
|
logdir = 'logdir /var/log/chrony' |
|
|
|
|
|
confd = nil |
|
|
case platform[:name] |
|
|
case platform[:name] |
|
|
when 'debian', 'ubuntu' |
|
|
when 'debian', 'ubuntu' |
|
|
config_file = '/etc/chrony/chrony.conf' |
|
|
config_file = '/etc/chrony/chrony.conf' |
|
|
|
|
|
|
|
|
config_file = '/etc/chrony/chrony.conf' |
|
|
config_file = '/etc/chrony/chrony.conf' |
|
|
keyfile += '/etc/chrony.keys' |
|
|
keyfile += '/etc/chrony.keys' |
|
|
driftfile += 'drift' |
|
|
driftfile += 'drift' |
|
|
|
|
|
when 'suse' |
|
|
|
|
|
config_file = '/etc/chrony.conf' |
|
|
|
|
|
keyfile += '/etc/chrony.keys' |
|
|
|
|
|
driftfile += 'drift' |
|
|
|
|
|
confd = '/etc/chrony.d' |
|
|
else |
|
|
else |
|
|
config_file = '/etc/chrony.conf' |
|
|
config_file = '/etc/chrony.conf' |
|
|
keyfile += '/etc/chrony.keys' |
|
|
keyfile += '/etc/chrony.keys' |
|
|
|
|
|
|
|
|
its('content') { should include 'pool 0.debian.pool.ntp.org iburst' } |
|
|
its('content') { should include 'pool 0.debian.pool.ntp.org iburst' } |
|
|
its('content') { should include 'pool 1.centos.pool.ntp.org' } |
|
|
its('content') { should include 'pool 1.centos.pool.ntp.org' } |
|
|
end |
|
|
end |
|
|
|
|
|
if !confd.nil? |
|
|
|
|
|
describe directory(confd) do |
|
|
|
|
|
its('size') { should be 0 } |
|
|
|
|
|
end |
|
|
|
|
|
end |
|
|
end |
|
|
end |