File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -66,19 +66,22 @@ class { 'ntp':
66
66
keys_enable => true,
67
67
keys_file => '/etc/ntp/keys',
68
68
keys_controlkey => '/etc/ntp/controlkey',
69
- keys_requestkey => '/etc/ntp/requestkey ',
70
- keys_trusted => [ '/etc/ntp/key1 ', '/etc/ntp/key2 ' ],
69
+ keys_requestkey => '1 ',
70
+ keys_trusted => [ '1 ', '2 ' ],
71
71
}
72
72
EOS
73
+ # Rely on a shell command instead of a file{} here to avoid loops
74
+ # within puppet when it tries to manage /etc/ntp/keys before /etc/ntp.
75
+ shell ( "mkdir -p /etc/ntp && echo '1 M AAAABBBB' >> /etc/ntp/keys" )
73
76
apply_manifest ( pp , :catch_failures => true )
74
77
end
75
78
76
79
describe file ( '/etc/ntp.conf' ) do
77
80
it { should be_file }
78
81
it { should contain 'keys /etc/ntp/keys' }
79
82
it { should contain 'controlkey /etc/ntp/controlkey' }
80
- it { should contain 'requestkey /etc/ntp/requestkey ' }
81
- it { should contain 'trustedkey /etc/ntp/key1 /etc/ntp/key2 ' }
83
+ it { should contain 'requestkey 1 ' }
84
+ it { should contain 'trustedkey 1 2 ' }
82
85
end
83
86
end
84
87
You can’t perform that action at this time.
0 commit comments