specinfra 1.25.8 → 1.26.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/specinfra/backend/ssh.rb +4 -1
- data/lib/specinfra/command/base.rb +4 -0
- data/lib/specinfra/command/linux.rb +12 -0
- data/lib/specinfra/version.rb +1 -1
- 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: 38340f2ab0fa6f2bb429b18c11f7b66ab4684d8a
|
4
|
+
data.tar.gz: ae98d7b97ccc70c47666f67b12722e04cedc0f7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b32c5e713056475d8c5dfc51e5b13724fb14b0d08aa073edc7db798df425dd7251be359aae3130c2b10677362ff057451600efe9c3eb5b56a30bfdb5d8542dc5
|
7
|
+
data.tar.gz: 864c9350cdc8e6b2a9326af749126e9de92d937c3320c8e144a9d3c92f2c9e004fc8578127f0983a64a4f5e9cbe53719b9f054f3d965e0a58324132a348564f9
|
@@ -58,6 +58,7 @@ module SpecInfra
|
|
58
58
|
exit_status = nil
|
59
59
|
exit_signal = nil
|
60
60
|
pass_prompt = SpecInfra.configuration.pass_prompt || /^\[sudo\] password for/
|
61
|
+
retry_prompt = /^Sorry, try again/
|
61
62
|
|
62
63
|
ssh = SpecInfra.configuration.ssh
|
63
64
|
ssh.open_channel do |channel|
|
@@ -69,7 +70,9 @@ module SpecInfra
|
|
69
70
|
channel.exec("#{command}") do |ch, success|
|
70
71
|
abort "FAILED: couldn't execute command (ssh.channel.exec)" if !success
|
71
72
|
channel.on_data do |ch, data|
|
72
|
-
if data.match
|
73
|
+
if data.match retry_prompt
|
74
|
+
abort 'Wrong sudo password! Please confirm your password.'
|
75
|
+
elsif data.match pass_prompt
|
73
76
|
channel.send_data "#{SpecInfra.configuration.sudo_password}\n"
|
74
77
|
else
|
75
78
|
stdout_data += data
|
@@ -289,6 +289,10 @@ module SpecInfra
|
|
289
289
|
raise NotImplementedError.new
|
290
290
|
end
|
291
291
|
|
292
|
+
def check_ip6tables_rule(rule, table=nil, chain=nil)
|
293
|
+
raise NotImplementedError.new
|
294
|
+
end
|
295
|
+
|
292
296
|
def check_zfs(zfs, property=nil, value=nil)
|
293
297
|
raise NotImplementedError.new
|
294
298
|
end
|
@@ -17,6 +17,18 @@ module SpecInfra
|
|
17
17
|
cmd
|
18
18
|
end
|
19
19
|
|
20
|
+
def check_ip6tables_rule(rule, table=nil, chain=nil)
|
21
|
+
cmd = "ip6tables"
|
22
|
+
cmd += " -t #{escape(table)}" if table
|
23
|
+
cmd += " -S"
|
24
|
+
cmd += " #{escape(chain)}" if chain
|
25
|
+
cmd += " | grep -- #{escape(rule)}"
|
26
|
+
cmd += " || ip6tables-save"
|
27
|
+
cmd += " -t #{escape(table)}" if table
|
28
|
+
cmd += " | grep -- #{escape(rule)}"
|
29
|
+
cmd
|
30
|
+
end
|
31
|
+
|
20
32
|
def check_selinux(mode)
|
21
33
|
cmd = ""
|
22
34
|
cmd += "test ! -f /etc/selinux/config || (" if mode == "disabled"
|
data/lib/specinfra/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: specinfra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.26.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|