Saltstack Official Chrony Formula
Vous ne pouvez pas sélectionner plus de 25 sujets
Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
|
- # frozen_string_literal: true
-
- # Overide by OS
- keyfile = 'keyfile '
- driftfile = '/var/lib/chrony/'
- logdir = 'logdir /var/log/chrony'
- case os[:name]
- when 'debian', 'ubuntu'
- config_file = '/etc/chrony/chrony.conf'
- keyfile += '/etc/chrony/chrony.keys'
- driftfile += 'chrony.drift'
- else
- config_file = '/etc/chrony.conf'
- keyfile += '/etc/chrony.keys'
- driftfile += 'drift'
- end
-
- control 'Chrony configuration' do
- title 'should match desired lines'
-
- describe file(config_file) do
- it { should be_file }
- it { should be_owned_by 'root' }
- it { should be_grouped_into 'root' }
- its('mode') { should cmp '0644' }
- its('content') { should include keyfile }
- its('content') { should include driftfile }
- its('content') { should include logdir }
- end
- end
|