File tree Expand file tree Collapse file tree 4 files changed +15
-1
lines changed Expand file tree Collapse file tree 4 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 6
6
' default_schedules' : value => $puppet::agent_default_schedules ;
7
7
' report' : value => $puppet::report ;
8
8
' masterport' : value => $puppet::agent_server_port ;
9
- ' environment' : value => $puppet::environment ;
10
9
' splay' : value => $puppet::splay ;
11
10
' splaylimit' : value => $puppet::splaylimit ;
12
11
' runinterval' : value => $puppet::runinterval ;
13
12
' noop' : value => $puppet::agent_noop ;
14
13
' usecacheonfailure' : value => $puppet::usecacheonfailure ;
15
14
}
15
+ if $puppet::agent_manage_environment {
16
+ puppet::config::agent { 'environment' : value => $puppet::environment }
17
+ }
16
18
if $puppet::http_connect_timeout != undef {
17
19
puppet::config::agent {
18
20
' http_connect_timeout' : value => $puppet::http_connect_timeout ;
Original file line number Diff line number Diff line change 185
185
#
186
186
# $agent_default_schedules:: A boolean to enable/disable the default schedules
187
187
#
188
+ # $agent_manage_environment:: A boolean to enable/disable managing the agent environment
189
+ #
188
190
# $agent_additional_settings:: A hash of additional agent settings.
189
191
# Example: {stringify_facts => true}
190
192
#
616
618
Integer[0] $systemd_randomizeddelaysec = $puppet::params::systemd_randomizeddelaysec ,
617
619
Boolean $agent_noop = $puppet::params::agent_noop ,
618
620
Boolean $agent_default_schedules = $puppet::params::agent_default_schedules ,
621
+ Boolean $agent_manage_environment = $puppet::params::agent_manage_environment ,
619
622
Boolean $show_diff = $puppet::params::show_diff ,
620
623
Optional[Stdlib::HTTPUrl] $module_repository = $puppet::params::module_repository ,
621
624
Optional[Integer[0]] $http_connect_timeout = $puppet::params::http_connect_timeout ,
Original file line number Diff line number Diff line change 34
34
$dns_alt_names = []
35
35
$use_srv_records = false
36
36
$agent_default_schedules = false
37
+ $agent_manage_environment = true
37
38
38
39
$srv_domain = fact(' networking.domain' )
39
40
Original file line number Diff line number Diff line change 399
399
400
400
it { is_expected . to contain_puppet__config__agent ( 'report' ) . with_value ( 'false' ) }
401
401
end
402
+
403
+ context 'with agent_manage_environment false' do
404
+ let ( :params ) { { agent_manage_environment : false } }
405
+
406
+ it do
407
+ is_expected . not_to contain_puppet__config__agent ( 'environment' )
408
+ end
409
+ end
402
410
end
403
411
end
404
412
end
You can’t perform that action at this time.
0 commit comments