File tree 2 files changed +23
-6
lines changed
2 files changed +23
-6
lines changed Original file line number Diff line number Diff line change 50
50
51
51
if $external_core {
52
52
foreman_proxy::plugin { 'dynflow_core' :
53
+ notify => Service[' smart_proxy_dynflow_core' ],
53
54
}
54
- ~> file { ' /etc/smart_proxy_dynflow_core/settings.yml' :
55
+
56
+ file { '/etc/smart_proxy_dynflow_core/settings.yml' :
55
57
ensure => file ,
56
58
content => template (' foreman_proxy/plugin/dynflow_core.yml.erb' ),
59
+ require => Foreman_proxy::Plugin[' dynflow_core' ],
60
+ notify => Service[' smart_proxy_dynflow_core' ],
57
61
}
58
- ~> file { ' /etc/smart_proxy_dynflow_core/settings.d' :
59
- ensure => link,
60
- target => " ${foreman_proxy::config_dir} /settings.d" ,
62
+
63
+ file { '/etc/smart_proxy_dynflow_core/settings.d' :
64
+ ensure => link,
65
+ target => " ${foreman_proxy::config_dir} /settings.d" ,
66
+ require => Foreman_proxy::Plugin[' dynflow_core' ],
67
+ notify => Service[' smart_proxy_dynflow_core' ],
61
68
}
62
- ~> systemd::service_limits { ' smart_proxy_dynflow_core.service' :
69
+
70
+ systemd::service_limits { 'smart_proxy_dynflow_core.service' :
63
71
limits => {
64
72
' LimitNOFILE' => $open_file_limit ,
65
73
},
66
74
restart_service => false ,
75
+ require => Foreman_proxy::Plugin[' dynflow_core' ],
67
76
}
68
- ~> service { ' smart_proxy_dynflow_core' :
77
+
78
+ service { 'smart_proxy_dynflow_core' :
69
79
ensure => running ,
70
80
enable => true ,
71
81
}
Original file line number Diff line number Diff line change 54
54
":ssl_private_key: /etc/puppetlabs/puppet/ssl/private_keys/foo.example.com.pem" ,
55
55
] )
56
56
end
57
+
58
+ it 'should restart external core' do
59
+ should contain_file ( "#{ etc_dir } /smart_proxy_dynflow_core/settings.yml" ) .
60
+ that_notifies ( 'Service[smart_proxy_dynflow_core]' )
61
+ should contain_file ( "#{ etc_dir } /smart_proxy_dynflow_core/settings.d" ) .
62
+ that_notifies ( 'Service[smart_proxy_dynflow_core]' )
63
+ end
57
64
else
58
65
it { should_not contain_foreman_proxy__plugin ( 'dynflow_core' ) }
59
66
it { should_not contain_file ( "#{ etc_dir } /smart_proxy_dynflow_core/settings.d" ) }
You can’t perform that action at this time.
0 commit comments