File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6666 $_ensure_pluginfactsource = ' absent'
6767 }
6868
69+ ini_setting { 'puppet client server agent' :
70+ ensure => absent ,
71+ path => " ${confdir} /puppet.conf" ,
72+ section => ' agent' ,
73+ setting => ' server' ,
74+ value => $puppet_server ,
75+ require => Class[' puppet::install' ],
76+ }
77+
6978 ini_setting { 'puppet client server' :
7079 ensure => $_ensure_puppet_server,
7180 path => " ${confdir} /puppet.conf" ,
72- section => ' agent ' ,
81+ section => ' main ' ,
7382 setting => ' server' ,
7483 value => $puppet_server ,
7584 require => Class[' puppet::install' ],
Original file line number Diff line number Diff line change 4444 end
4545 context 'when fed no parameters' do
4646 it "should properly set the puppet server setting in #{ confdir } /puppet.conf" do
47+ should contain_ini_setting ( 'puppet client server agent' ) . with ( {
48+ 'ensure' => 'absent' ,
49+ 'path' => "#{ confdir } /puppet.conf" ,
50+ 'section' => 'agent' ,
51+ 'setting' => 'server' ,
52+ 'value' => 'puppet'
53+ } )
4754 should contain_ini_setting ( 'puppet client server' ) . with ( {
4855 'ensure' => 'present' ,
4956 'path' => "#{ confdir } /puppet.conf" ,
50- 'section' => 'agent ' ,
57+ 'section' => 'main ' ,
5158 'setting' => 'server' ,
5259 'value' => 'puppet'
5360 } )
61+ end
62+ it "should properly set the puppet srv records settings in #{ confdir } /puppet.conf" do
5463 should contain_ini_setting ( 'puppet use_srv_records' ) . with ( {
5564 'ensure' => 'absent' ,
5665 'path' => "#{ confdir } /puppet.conf" ,
187196 context 'when ::puppet::puppet_server has a non-standard value' do
188197 let ( :pre_condition ) { "class{'::puppet': puppet_server => 'BOGON'}" }
189198 it "should properly set the server setting in #{ confdir } /puppet.conf" do
190- should contain_ini_setting ( 'puppet client server' ) . with ( {
199+ should_not contain_ini_setting ( 'puppet client server' ) . with ( {
191200 'path' => "#{ confdir } /puppet.conf" ,
192201 'section' => 'agent' ,
193202 'setting' => 'server' ,
194203 'value' => 'BOGON'
195204 } )
205+ should contain_ini_setting ( 'puppet client server' ) . with ( {
206+ 'path' => "#{ confdir } /puppet.conf" ,
207+ 'section' => 'main' ,
208+ 'setting' => 'server' ,
209+ 'value' => 'BOGON'
210+ } )
196211 end
197212 end # custom server
198213 context 'when ::puppet::environment has a non-standard value' do
283298 should contain_ini_setting ( 'puppet client server' ) . with ( {
284299 'ensure' => 'absent' ,
285300 'path' => "#{ confdir } /puppet.conf" ,
286- 'section' => 'agent ' ,
301+ 'section' => 'main ' ,
287302 'setting' => 'server' ,
288303 } )
289304 end
You can’t perform that action at this time.
0 commit comments