Ver código fonte

fix(suse): remove files in chrony.d

Remove files from chrony.d to avoid unmanaged configuration options.

Signed-off-by: Georg Pfuetzenreuter <georg.pfuetzenreuter@suse.com>
pull/40/head
Georg Pfuetzenreuter 1 ano atrás
pai
commit
603c9ab50f
Nenhuma conta vinculada ao e-mail do autor do commit
4 arquivos alterados com 24 adições e 0 exclusões
  1. +9
    -0
      chrony/config/file.sls
  2. +1
    -0
      chrony/defaults.yaml
  3. +3
    -0
      chrony/osfamilymap.yaml
  4. +11
    -0
      test/integration/default/controls/config_spec.rb

+ 9
- 0
chrony/config/file.sls Ver arquivo

include: include:
- {{ sls_package_install }} - {{ sls_package_install }}


{%- if chrony.confd is string %}
chrony-config-conf.d:
file.directory:
- name: {{ chrony.confd }}
- clean: True
- require:
- sls: {{ sls_package_install }}
{%- endif %}

chrony-config-file-file-managed: chrony-config-file-file-managed:
file.managed: file.managed:
- name: {{ chrony.config }} - name: {{ chrony.config }}

+ 1
- 0
chrony/defaults.yaml Ver arquivo

service: service:
name: chronyd name: chronyd
config: /etc/chrony.conf config: /etc/chrony.conf
confd: false
ntpservers: ntpservers:
- '0.us.pool.ntp.org' - '0.us.pool.ntp.org'
- '1.us.pool.ntp.org' - '1.us.pool.ntp.org'

+ 3
- 0
chrony/osfamilymap.yaml Ver arquivo

- 'maxdistance 6' - 'maxdistance 6'
- 'logchange 0.1' - 'logchange 0.1'


Suse:
confd: /etc/chrony.d

Gentoo: Gentoo:
package: net-misc/chrony package: net-misc/chrony
config: /etc/chrony/chrony.conf config: /etc/chrony/chrony.conf

+ 11
- 0
test/integration/default/controls/config_spec.rb Ver arquivo

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

Carregando…
Cancelar
Salvar