runsible 0.1.5.1 → 0.1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/runsible.rb +10 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 102591b2b40ed1023279dde8aa35e668088bcc3a
|
4
|
+
data.tar.gz: dbb1eec1abc5d05908fd0be65097ce194f154fad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 615d73bb63dd014432743d81d01f71e52b731b38602f507f3acd54157f6de34b2444c48dedda86693b8689a3270af7be429ac7acbb90b9ab1b626c1a8e6feb3f
|
7
|
+
data.tar.gz: d4d2af2f6c25bfed3443155551c4cc796970b40575ae6aef97f1f5f3d544f95ecad70e348c14e59321bcb8c65f4dc5d46f47ff5d05fc708542820595b892ed6e
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.6.1
|
data/lib/runsible.rb
CHANGED
@@ -21,7 +21,13 @@ module Runsible
|
|
21
21
|
retries: 0,
|
22
22
|
vars: [],
|
23
23
|
}
|
24
|
-
|
24
|
+
|
25
|
+
# defaults
|
26
|
+
SSH_OPTIONS = {
|
27
|
+
forward_agent: true,
|
28
|
+
paranoid: false,
|
29
|
+
timeout: 10, # connection timeout, raises on expiry
|
30
|
+
}
|
25
31
|
|
26
32
|
### Utility stuff ###
|
27
33
|
|
@@ -49,6 +55,7 @@ module Runsible
|
|
49
55
|
backend = settings['alerts'] && settings['alerts']['backend']
|
50
56
|
case backend
|
51
57
|
when 'disabled', nil, false
|
58
|
+
self.warn "DISABLED ALERT: [#{topic}] #{message}"
|
52
59
|
return
|
53
60
|
when 'email'
|
54
61
|
Pony.mail(to: settings.fetch(:address),
|
@@ -143,10 +150,9 @@ module Runsible
|
|
143
150
|
|
144
151
|
# initiate ssh connection, perform the runlist
|
145
152
|
def self.ssh_runlist(settings, runlist, ssh_options, yaml)
|
146
|
-
ssh_options
|
153
|
+
ssh_options = SSH_OPTIONS.merge(ssh_options)
|
147
154
|
ssh_options[:port] ||= settings.fetch('port')
|
148
155
|
ssh_options[:send_env] ||= settings['vars'] if settings['vars']
|
149
|
-
ssh_options[:timeout] ||= SSH_CNX_TIMEOUT
|
150
156
|
host, user = settings.fetch('host'), settings.fetch('user')
|
151
157
|
Net::SSH.start(host, user, ssh_options) { |ssh|
|
152
158
|
self.exec_runlist(ssh, runlist, settings, yaml)
|
@@ -168,7 +174,7 @@ module Runsible
|
|
168
174
|
self.warn excp
|
169
175
|
msg = "#{retries} retries exhausted; on_failure: #{on_failure}"
|
170
176
|
self.warn msg
|
171
|
-
self.alert(
|
177
|
+
self.alert("retries exhausted", excp, settings)
|
172
178
|
|
173
179
|
case on_failure
|
174
180
|
when 'continue'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: runsible
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rick Hull
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slop
|