malsh 0.1.9 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/malsh.rb +5 -0
- data/lib/malsh/cli.rb +1 -0
- data/lib/malsh/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: 347a943b1a31d9e96ce868829ed7244ee1f9b7e4
|
4
|
+
data.tar.gz: d8292cf71492b05ec754738f8674af60160c806d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8063808bd39e8639033f6586ea3df71dd820221e228e9c6cb6ca937fc2c41ebed7df0de82e8a0b0fb23936836516ffe78030cd376315862302aa74b16eddd47e
|
7
|
+
data.tar.gz: 27656b665489d656235323d93015cb915e8c212646510885f4f66c555288ddf9669e51b98dbfb9f84fb028ed18b46cb89c49b7554ac727cc91efc227716971b7
|
data/README.md
CHANGED
data/lib/malsh.rb
CHANGED
@@ -35,6 +35,11 @@ module Malsh
|
|
35
35
|
Malsh.options[:invert_match] && Malsh.options[:invert_match].find {|v| host_name(h).match(/#{v}/) }
|
36
36
|
end.reject do |h|
|
37
37
|
Malsh.options[:regexp] && Malsh.options[:regexp].all? {|r| !host_name(h).match(/#{r}/)}
|
38
|
+
end.reject do |h|
|
39
|
+
Malsh.options[:invert_role] && Malsh.options[:invert_role].find do |r|
|
40
|
+
service, role = r.split(/:/)
|
41
|
+
h.roles[service] && h.roles[service].include?(role)
|
42
|
+
end
|
38
43
|
end
|
39
44
|
end
|
40
45
|
|
data/lib/malsh/cli.rb
CHANGED
@@ -9,6 +9,7 @@ module Malsh
|
|
9
9
|
class_option :api_key, :type => :string, :aliases => :k
|
10
10
|
class_option :subject, :type => :string, :aliases => :s
|
11
11
|
class_option :invert_match, :type => :array, :aliases => :v
|
12
|
+
class_option :invert_role, :type => :array, :aliases => :r
|
12
13
|
class_option :regexp,:type => :array, :aliases => :e
|
13
14
|
|
14
15
|
desc 'retire', 'check forget retire host'
|
data/lib/malsh/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: malsh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kazuhiko yamahsita
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|