Place restrict options to NTP explicitly
To avoid undesirable restrict options in target config file, pass them explicitly when ntp task executed. Also noop tests for ntp manifests change such way that they really run now. Change-Id: I110b4b7c2e42dffc9449f54689236ff1582717cb Closes-Bug: #1505235
This commit is contained in:
parent
7e2385674b
commit
2626eee51d
|
@ -3,14 +3,20 @@ notice('MODULAR: ntp-server.pp')
|
|||
$ntp_servers = hiera('external_ntp')
|
||||
|
||||
class { 'ntp':
|
||||
servers => strip(split($ntp_servers['ntp_list'], ',')),
|
||||
service_enable => true,
|
||||
service_ensure => 'running',
|
||||
iburst_enable => true,
|
||||
tinker => true,
|
||||
panic => '0',
|
||||
stepout => '5',
|
||||
minpoll => '3',
|
||||
servers => strip(split($ntp_servers['ntp_list'], ',')),
|
||||
service_enable => true,
|
||||
service_ensure => 'running',
|
||||
iburst_enable => true,
|
||||
tinker => true,
|
||||
panic => '0',
|
||||
stepout => '5',
|
||||
minpoll => '3',
|
||||
restrict => [
|
||||
'-4 default kod nomodify notrap nopeer noquery',
|
||||
'-6 default kod nomodify notrap nopeer noquery',
|
||||
'127.0.0.1',
|
||||
'::1',
|
||||
],
|
||||
}
|
||||
|
||||
class { 'cluster::ntp_ocf': }
|
||||
|
|
|
@ -3,6 +3,18 @@ require 'shared-examples'
|
|||
manifest = 'ntp/ntp-server.pp'
|
||||
|
||||
describe manifest do
|
||||
shared_examples 'catalog' do
|
||||
|
||||
it 'should pass restrictions explicitly' do
|
||||
should contain_class('ntp').with(
|
||||
'restrict' => [
|
||||
'-4 default kod nomodify notrap nopeer noquery',
|
||||
'-6 default kod nomodify notrap nopeer noquery',
|
||||
'127.0.0.1',
|
||||
'::1',
|
||||
])
|
||||
end
|
||||
end
|
||||
test_ubuntu_and_centos manifest
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue