File tree Expand file tree Collapse file tree 3 files changed +48
-2
lines changed Expand file tree Collapse file tree 3 files changed +48
-2
lines changed Original file line number Diff line number Diff line change 29
29
# ['trusted_node_data'] - Enable the trusted facts hash
30
30
# ['listen'] - If puppet agent should listen for connections
31
31
# ['reportserver'] - The server to send transaction reports to.
32
+ # ['show_diff'] - Should the reports contain diff output
32
33
# ['digest_algorithm'] - The algorithm to use for file digests.
33
34
# ['templatedir'] - Template dir, if unset it will remove the setting.
34
35
# ['configtimeout'] - How long the client should wait for the configuration to be retrieved before considering it a failure
95
96
$pluginsync = true ,
96
97
$listen = false ,
97
98
$reportserver = ' $server' ,
99
+ $show_diff = undef ,
98
100
$digest_algorithm = $::puppet::params::digest_algorithm,
99
101
$configtimeout = ' 2m' ,
100
102
$stringify_facts = undef ,
157
159
$startonboot = ' no'
158
160
$daemonize = false
159
161
}
160
-
162
+
161
163
162
164
if ($::osfamily == ' Debian' and $puppet_run_style != ' manual' ) or ($::osfamily == ' Redhat' ) {
163
165
file { $puppet::params::puppet_defaults :
307
309
value => $puppet_ssldir ,
308
310
}
309
311
}
312
+
313
+ if $show_diff != undef {
314
+ ini_setting {'puppetagentshow_diff' :
315
+ ensure => present ,
316
+ section => ' main' ,
317
+ setting => ' show_diff' ,
318
+ value => $show_diff ,
319
+ }
320
+ unless defined (Package[$::puppet::params::ruby_diff_lcs ]) {
321
+ package {$::puppet::params::ruby_diff_lcs :
322
+ ensure => ' latest' ,
323
+ }
324
+ }
325
+ }
310
326
311
327
# rundir has no default and must be provided.
312
328
ini_setting {'puppetagentrundir' :
536
552
value => $serialization_format ,
537
553
}
538
554
}
539
- }
555
+ }
Original file line number Diff line number Diff line change 64
64
$rack_package = ' rubygem-rack'
65
65
$ruby_dev = ' ruby-devel'
66
66
$puppet_facter_package = nil
67
+ $ruby_diff_lcs = ' rubygem-diff-lcs'
67
68
}
68
69
' Suse' : {
69
70
$puppet_master_package = ' puppet-server'
74
75
$passenger_package = ' rubygem-passenger-apache2'
75
76
$rack_package = ' rubygem-rack'
76
77
$puppet_facter_package = nil
78
+ $ruby_diff_lcs = ' rubygem-diff-lcs'
77
79
}
78
80
' Debian' : {
79
81
$puppet_master_package = ' puppetmaster'
86
88
$rack_package = ' librack-ruby'
87
89
$ruby_dev = ' ruby-dev'
88
90
$puppet_facter_package = nil
91
+ $ruby_diff_lcs = ' ruby-diff-lcs'
89
92
}
90
93
' FreeBSD' : {
91
94
$puppet_agent_service = ' puppet'
Original file line number Diff line number Diff line change 557
557
}
558
558
end
559
559
end
560
+ describe 'puppetagentshow_diff' do
561
+ let ( :facts ) do
562
+ {
563
+ :osfamily => 'RedHat' ,
564
+ :operatingsystem => 'RedHat' ,
565
+ :kernel => 'Linux' ,
566
+ :puppetversion => '3.8.0'
567
+ }
568
+ end
569
+ context 'with show_diff set' do
570
+ let ( :params ) do
571
+ {
572
+ :show_diff => true ,
573
+ }
574
+ end
575
+
576
+ it {
577
+ should contain_ini_setting ( 'puppetagentshow_diff' ) . with (
578
+ :ensure => 'present' ,
579
+ :section => 'main' ,
580
+ :setting => 'show_diff' ,
581
+ :value => true ,
582
+ :path => '/etc/puppet/puppet.conf'
583
+ )
584
+ }
585
+ end
586
+ end
560
587
describe 'puppetagentstringifyfacts' do
561
588
let ( :facts ) do
562
589
{
You can’t perform that action at this time.
0 commit comments