Saltstack Official Chrony Formula
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

35 líneas
895B

  1. # frozen_string_literal: true
  2. # Overide by OS
  3. keyfile = 'keyfile '
  4. driftfile = '/var/lib/chrony/'
  5. logdir = 'logdir /var/log/chrony'
  6. case platform[:name]
  7. when 'debian', 'ubuntu'
  8. config_file = '/etc/chrony/chrony.conf'
  9. keyfile += '/etc/chrony/chrony.keys'
  10. driftfile += 'chrony.drift'
  11. when 'gentoo'
  12. config_file = '/etc/chrony/chrony.conf'
  13. keyfile += '/etc/chrony.keys'
  14. driftfile += 'drift'
  15. else
  16. config_file = '/etc/chrony.conf'
  17. keyfile += '/etc/chrony.keys'
  18. driftfile += 'drift'
  19. end
  20. control 'Chrony configuration' do
  21. title 'should match desired lines'
  22. describe file(config_file) do
  23. it { should be_file }
  24. it { should be_owned_by 'root' }
  25. it { should be_grouped_into 'root' }
  26. its('mode') { should cmp '0644' }
  27. its('content') { should include keyfile }
  28. its('content') { should include driftfile }
  29. its('content') { should include logdir }
  30. end
  31. end