File tree Expand file tree Collapse file tree 3 files changed +44
-0
lines changed Expand file tree Collapse file tree 3 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 27
27
# ['trusted_node_data'] - Enable the trusted facts hash
28
28
# ['listen'] - If puppet agent should listen for connections
29
29
# ['reportserver'] - The server to send transaction reports to.
30
+ # ['show_diff'] - Should the reports contain diff output
30
31
# ['digest_algorithm'] - The algorithm to use for file digests.
31
32
# ['templatedir'] - Template dir, if unset it will remove the setting.
32
33
# ['configtimeout'] - How long the client should wait for the configuration to be retrieved before considering it a failure
90
91
$pluginsync = true ,
91
92
$listen = false ,
92
93
$reportserver = ' $server' ,
94
+ $show_diff = undef ,
93
95
$digest_algorithm = $::puppet::params::digest_algorithm,
94
96
$configtimeout = ' 2m' ,
95
97
$stringify_facts = undef ,
273
275
value => $puppet_ssldir ,
274
276
}
275
277
}
278
+ if $show_diff != undef {
279
+ ini_setting {'puppetagentshow_diff' :
280
+ ensure => present ,
281
+ section => ' main' ,
282
+ setting => ' show_diff' ,
283
+ value => $show_diff ,
284
+ }
285
+ unless defined (Package[$::puppet::params::ruby_diff_lcs ]) {
286
+ package {$::puppet::params::ruby_diff_lcs :
287
+ ensure => ' latest' ,
288
+ }
289
+ }
290
+ }
276
291
277
292
# rundir has no default and must be provided.
278
293
ini_setting {'puppetagentrundir' :
Original file line number Diff line number Diff line change 54
54
$passenger_package = ' mod_passenger'
55
55
$rack_package = ' rubygem-rack'
56
56
$ruby_dev = ' ruby-devel'
57
+ $ruby_diff_lcs = ' rubygem-diff-lcs'
57
58
}
58
59
' Suse' : {
59
60
$puppet_master_package = ' puppet-server'
65
66
$puppet_ssldir = ' /var/lib/puppet/ssl'
66
67
$passenger_package = ' rubygem-passenger-apache2'
67
68
$rack_package = ' rubygem-rack'
69
+ $ruby_diff_lcs = ' rubygem-diff-lcs'
68
70
}
69
71
' Debian' : {
70
72
$puppet_master_package = ' puppetmaster'
78
80
$passenger_package = ' libapache2-mod-passenger'
79
81
$rack_package = ' librack-ruby'
80
82
$ruby_dev = ' ruby-dev'
83
+ $ruby_diff_lcs = ' ruby-diff-lcs'
81
84
}
82
85
' FreeBSD' : {
83
86
$puppet_agent_service = ' puppet'
Original file line number Diff line number Diff line change 551
551
}
552
552
end
553
553
end
554
+ describe 'puppetagentshow_diff' do
555
+ let ( :facts ) do
556
+ {
557
+ :osfamily => 'RedHat' ,
558
+ :operatingsystem => 'RedHat' ,
559
+ :kernel => 'Linux'
560
+ }
561
+ end
562
+ context 'with show_diff set' do
563
+ let ( :params ) do
564
+ {
565
+ :show_diff => true ,
566
+ }
567
+ end
568
+
569
+ it {
570
+ should contain_ini_setting ( 'puppetagentshow_diff' ) . with (
571
+ :ensure => 'present' ,
572
+ :section => 'main' ,
573
+ :setting => 'show_diff' ,
574
+ :value => true ,
575
+ :path => '/etc/puppet/puppet.conf'
576
+ )
577
+ }
578
+ end
579
+ end
554
580
describe 'puppetagentstringifyfacts' do
555
581
let ( :facts ) do
556
582
{
You can’t perform that action at this time.
0 commit comments