浏览代码

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年前
父节点
当前提交
603c9ab50f
没有帐户链接到提交者的电子邮件
共有 4 个文件被更改,包括 24 次插入0 次删除
  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 查看文件

@@ -10,6 +10,15 @@
include:
- {{ 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:
file.managed:
- name: {{ chrony.config }}

+ 1
- 0
chrony/defaults.yaml 查看文件

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

+ 3
- 0
chrony/osfamilymap.yaml 查看文件

@@ -60,6 +60,9 @@ openSUSE:
- 'maxdistance 6'
- 'logchange 0.1'

Suse:
confd: /etc/chrony.d

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

+ 11
- 0
test/integration/default/controls/config_spec.rb 查看文件

@@ -4,6 +4,7 @@
keyfile = 'keyfile '
driftfile = '/var/lib/chrony/'
logdir = 'logdir /var/log/chrony'
confd = nil
case platform[:name]
when 'debian', 'ubuntu'
config_file = '/etc/chrony/chrony.conf'
@@ -13,6 +14,11 @@ when 'gentoo'
config_file = '/etc/chrony/chrony.conf'
keyfile += '/etc/chrony.keys'
driftfile += 'drift'
when 'suse'
config_file = '/etc/chrony.conf'
keyfile += '/etc/chrony.keys'
driftfile += 'drift'
confd = '/etc/chrony.d'
else
config_file = '/etc/chrony.conf'
keyfile += '/etc/chrony.keys'
@@ -35,4 +41,9 @@ control 'Chrony configuration' do
its('content') { should include 'pool 0.debian.pool.ntp.org iburst' }
its('content') { should include 'pool 1.centos.pool.ntp.org' }
end
if !confd.nil?
describe directory(confd) do
its('size') { should be 0 }
end
end
end

正在加载...
取消
保存