File tree Expand file tree Collapse file tree 4 files changed +20
-6
lines changed
Expand file tree Collapse file tree 4 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 88
99 if $license_key {
1010 class { 'profiles::newrelic::infrastructure::install' :
11- version => $version
11+ version => $version ,
12+ notify => Class[' profiles::newrelic::infrastructure::service' ]
1213 }
1314
1415 class { 'profiles::newrelic::infrastructure::configuration' :
1516 license_key => $license_key ,
1617 log_level => $log_level ,
17- attributes => $attributes
18+ attributes => $attributes ,
19+ require => Class[' profiles::newrelic::infrastructure::install' ],
20+ notify => Class[' profiles::newrelic::infrastructure::service' ]
1821 }
1922
2023 class { 'profiles::newrelic::infrastructure::service' :
2124 status => $service_status
2225 }
23-
24- Class[' profiles::newrelic::infrastructure::install' ] -> Class[' profiles::newrelic::infrastructure::configuration' ]
25- Class[' profiles::newrelic::infrastructure::configuration' ] ~> Class[' profiles::newrelic::infrastructure::service' ]
26-
2726 }
2827}
2928
Original file line number Diff line number Diff line change 1818 content => template (' profiles/newrelic/infrastructure/newrelic-infra.yml.erb' )
1919 }
2020
21+ systemd::dropin_file { 'newrelic-infra_override.conf' :
22+ ensure => ' present' ,
23+ unit => ' newrelic-infra.service' ,
24+ filename => ' override.conf' ,
25+ content => " [Service]\n PIDFile=/run/newrelic-infra/newrelic-infra.pid"
26+ }
27+
2128 file { '/etc/newrelic-infra/integrations.d' :
2229 ensure => ' directory' ,
2330 recurse => true ,
Original file line number Diff line number Diff line change 4444 'mode' => '0640'
4545 ) }
4646
47+ it { is_expected . to contain_systemd__dropin_file ( 'newrelic-infra_override.conf' ) . with (
48+ 'unit' => 'newrelic-infra.service' ,
49+ 'ensure' => 'present' ,
50+ 'filename' => 'override.conf' ,
51+ 'content' => "[Service]\n PIDFile=/run/newrelic-infra/newrelic-infra.pid"
52+ ) }
53+
4754 it { is_expected . to contain_file ( '/etc/newrelic-infra.yml' ) . with_content ( /^license_key: my_license_key$/ ) }
4855 it { is_expected . to contain_file ( '/etc/newrelic-infra.yml' ) . with_content ( /^display_name: mynode.example.com$/ ) }
4956 it { is_expected . to contain_file ( '/etc/newrelic-infra.yml' ) . with_content ( /^dns_hostname_resolution: false$/ ) }
Original file line number Diff line number Diff line change 3636 ) }
3737
3838 it { is_expected . to contain_class ( 'profiles::newrelic::infrastructure::install' ) . that_comes_before ( 'Class[profiles::newrelic::infrastructure::configuration]' ) }
39+ it { is_expected . to contain_class ( 'profiles::newrelic::infrastructure::install' ) . that_notifies ( 'Class[profiles::newrelic::infrastructure::service]' ) }
3940 it { is_expected . to contain_class ( 'profiles::newrelic::infrastructure::configuration' ) . that_notifies ( 'Class[profiles::newrelic::infrastructure::service]' ) }
4041 end
4142
You can’t perform that action at this time.
0 commit comments