poise-monit 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5910f2212aae422952d183c3181c7a9f16ba7645
4
- data.tar.gz: be58c2407526be1cfdc0f618898c18b1333447a9
3
+ metadata.gz: 3428e8e8bb8c8f1e1d92944526544f9127c5390c
4
+ data.tar.gz: 7e416f1611d2bbfc56b1c0a667aeab2652ade403
5
5
  SHA512:
6
- metadata.gz: a72322971a42e15e31d8c6c5008d1186b4b66bf38a4f7339a0cfaf2a5a069267077d2c228b1308a82a99f2f42adbf680de67e48b1dcbc9bed2a34cb3e09cf633
7
- data.tar.gz: 7918da029cf7e55e252f69cf166e66998bdefe6939bc8b8a90209990b40b189b33bca84f1decc79abb776fba327713a9851f8fadc76d4b762793834cff126e56
6
+ metadata.gz: 6b893215424d741a5ce7a3b697e16bcf10f1f247ca2573c581403b402338097622b7b05ce763781abc4fd42e0c355aef1842bce79a4decbfec768e90f5a9f696
7
+ data.tar.gz: a9f74101c31bc8bf3aadda6f9b5ac531f633428d3c6c217d6f98bff5cae6da1bd3674d25d3c3bc69a6267a9ac2eaef602ba2aca263771dd4cc9bf0806e095915
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Poise-Monit Changelog
2
2
 
3
+ ## v1.5.0
4
+
5
+ * Allow overriding the template used for the `monit` service provider.
6
+
3
7
  ## v1.4.0
4
8
 
5
9
  * Allow tuning the timeout and wait for `monit_service` via node attributes.
data/README.md CHANGED
@@ -268,6 +268,26 @@ The service provider has two node attributes that can used for global tuning:
268
268
  * `node['poise-monit']['monit_service_wait']` – Seconds to wait between attempts
269
269
  when registering a new service with Monit. *(default: 1)*
270
270
 
271
+ ### Options
272
+
273
+ * `pid_file` – Path to PID file that the service command will create.
274
+ * `pid_file_external` – If true, assume the service will create the PID file
275
+ itself. *(default: true if `pid_file` option is set)*
276
+ * `template` – Override the default script template. If you want to use a
277
+ template in a different cookbook use `'cookbook:template'`.
278
+ * `monit_template` – Override the default monit template. If you want to use a
279
+ template in a different cookbook use `'cookbook:template'`.
280
+ * `command` – Override the service command.
281
+ * `directory` – Override the service directory.
282
+ * `environment` – Override the service environment variables.
283
+ * `reload_signal` – Override the service reload signal.
284
+ * `stop_signal` – Override the service stop signal.
285
+ * `user` – Override the service user.
286
+ * `never_restart` – Never try to restart the service.
287
+ * `never_reload` – Never try to reload the service.
288
+ * `script_path` – Override the path to the generated service script.
289
+ * `parent` – Override the auto-detection of which `monit` resource to use.
290
+
271
291
  ## Upgrading From `monit`
272
292
 
273
293
  Upgrading from the older [`monit` cookbook](https://github.com/poise/poise-monit-compat)
@@ -94,9 +94,22 @@ module PoiseMonit
94
94
  _parent = service_resource.parent
95
95
  _script_path = script_path
96
96
  monit_config new_resource.service_name do
97
- cookbook 'poise-monit'
97
+ if options['monit_template']
98
+ # If we have a template override, allow specifying a cookbook via
99
+ # "cookbook:template".
100
+ parts = options['monit_template'].split(/:/, 2)
101
+ if parts.length == 2
102
+ source parts[1]
103
+ cookbook parts[0]
104
+ else
105
+ source parts.first
106
+ cookbook new_resource.cookbook_name.to_s
107
+ end
108
+ else
109
+ source 'monit_service.conf.erb'
110
+ cookbook 'poise-monit'
111
+ end
98
112
  parent _parent
99
- source 'monit_service.conf.erb'
100
113
  variables service_resource: new_resource, options: _options, pid_file: _pid_file, script_path: _script_path
101
114
  # Don't trigger a restart if the template doesn't already exist, this
102
115
  # prevents restarting on the run that first creates the service.
@@ -16,5 +16,5 @@
16
16
 
17
17
 
18
18
  module PoiseMonit
19
- VERSION = '1.4.0'
19
+ VERSION = '1.5.0'
20
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poise-monit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noah Kantrowitz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-07 00:00:00.000000000 Z
11
+ date: 2016-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: halite