lita-puppet 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lita/handlers/puppet.rb +9 -1
- data/lita-puppet.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad13e64d44dcd2449adc71fc7929d73423550f27
|
4
|
+
data.tar.gz: c412fd246b0c04db63b6554725a3c686e332ac03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 727c36a9efef1520324e086eaf6cf1790239d872a57982be15caae31a4cabac2b8107069bbcfc01491dfcc9020476e2bfa2798f9acd4601832ef193b7b3c6a75
|
7
|
+
data.tar.gz: 75b8b0c74e0e9cc51019bec4a3f28304d44b75d21e3dc25490612de921d370c1160fec3156f03527360fbd1dc0d8b8a38f0e3a7c766d73d3ee5da98efc363c8e
|
data/lib/lita/handlers/puppet.rb
CHANGED
@@ -20,6 +20,10 @@ module Lita
|
|
20
20
|
control_repo = config.control_repo_path || '/opt/puppet/control'
|
21
21
|
user = config.ssh_user || 'lita'
|
22
22
|
|
23
|
+
response.reply("I'll get right on that. Give me a moment and I'll let you know how it went.")
|
24
|
+
|
25
|
+
ret = nil
|
26
|
+
|
23
27
|
Timeout::timeout(600) do
|
24
28
|
puppet_master = Rye::Box.new(config.master_hostname, user: user)
|
25
29
|
puppet_master.cd control_repo
|
@@ -40,7 +44,11 @@ module Lita
|
|
40
44
|
|
41
45
|
# build a reply
|
42
46
|
reply_text = "Here's what happened:\n"
|
43
|
-
|
47
|
+
if ret
|
48
|
+
reply_text << ret.stdout.join("\n")
|
49
|
+
else
|
50
|
+
reply_text = "That didn't seem to work... I think it timed out."
|
51
|
+
end
|
44
52
|
response.reply(reply_text)
|
45
53
|
end
|
46
54
|
|
data/lita-puppet.gemspec
CHANGED