This repository was archived by the owner on Feb 1, 2022. It is now read-only.
File tree 5 files changed +54
-0
lines changed
5 files changed +54
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,14 @@ supervisord::group { 'mygroup':
91
91
}
92
92
```
93
93
94
+ ### Configure a ctlplugin
95
+
96
+ ``` ruby
97
+ supervisord::ctlplugin { ' laforge' :
98
+ ctl_factory => ' mr.laforge.controllerplugin:make_laforge_controllerplugin'
99
+ }
100
+ ```
101
+
94
102
### Configure an eventlistener
95
103
96
104
``` ruby
Original file line number Diff line number Diff line change
1
+ # Define: supervisord::ctlplugin
2
+ #
3
+ # This define creates a ctlplugin section in supervisord.conf
4
+ #
5
+ # Sadly, I have been unable to find any documentation or mention of this stanza type
6
+ # in any of supervisord docs or code, but I am using it in production and it works.
7
+ #
8
+ #
9
+ # Documentation on parameters available at:
10
+ # http://supervisord.org/configuration.html#program-x-section-settings
11
+ #
12
+ define supervisord::ctlplugin (
13
+ $ctl_factory ,
14
+ $ensure = present ,
15
+ ) {
16
+ include supervisord
17
+
18
+ # parameter validation
19
+ validate_string($ctl_factory )
20
+
21
+ concat::fragment { "ctlplugin:${name}" :
22
+ target => $supervisord::config_file ,
23
+ content => template (' supervisord/conf/ctlplugin.erb' ),
24
+ order => 70,
25
+ }
26
+
27
+ }
Original file line number Diff line number Diff line change
1
+ require 'spec_helper'
2
+
3
+ describe 'supervisord::ctlplugin' , :type => :define do
4
+ let ( :title ) { 'foo' }
5
+ let ( :facts ) { { :concat_basedir => '/var/lib/puppet/concat' } }
6
+
7
+ context 'default' do
8
+ let ( :params ) { { :ctl_factory => 'bar.baz:make_bat' } }
9
+ it { should contain_supervisord__ctlplugin ( 'foo' ) }
10
+ it { should contain_concat__fragment ( 'ctlplugin:foo' ) \
11
+ . with_content ( /supervisor\. ctl_factory = bar\. baz:make_bat/ ) }
12
+ end
13
+ end
Original file line number Diff line number Diff line change
1
+ [ctlplugin:<%= @name %> ]
2
+ supervisor.ctl_factory = <%= @ctl_factory %>
3
+
Original file line number Diff line number Diff line change
1
+ supervisord::ctlplugin { 'mr.laforge' :
2
+ ctl_factory => ' mr.laforge.controllerplugin:make_laforge_controllerplugin' ,
3
+ }
You can’t perform that action at this time.
0 commit comments