ec2-host 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +9 -9
- data/ec2-host.gemspec +1 -1
- data/lib/ec2/host/cli.rb +4 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 102536f35c6b99c8c74bbb46965b3c402e7d9063
|
4
|
+
data.tar.gz: 4e7c94b2b0fe59440cb39dc8dbc37c43d476f12b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8a3e53b568cb501c9de400687d54a06f266d6116e1471894db05bc9af2236a12b8dd331d4d66664567420dc60b3ae188e240f8af59419bfbf75e6e6546b6dc2
|
7
|
+
data.tar.gz: b6bc74ff28fce3ce0ec1fb24d2ae3d136a76142852f10c6eb1b21d902d6e25a8b2d2ecf2abea9e9a4239b79763fc2735f383d1ffda16bb3a12596db6f137edd3
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -22,18 +22,18 @@ AWS SDK (CLI) parameters:
|
|
22
22
|
|
23
23
|
ec2-host parameters:
|
24
24
|
|
25
|
-
* **HOSTNAME_TAG**: EC2 tag key used to express a hostname. The default is `Name`.
|
26
|
-
* **ROLES_TAG**: EC2 tag keys used to express roles. The default is `Roles`
|
25
|
+
* **HOSTNAME_TAG (optional)**: EC2 tag key used to express a hostname. The default is `Name`.
|
26
|
+
* **ROLES_TAG (optional)**: EC2 tag keys used to express roles. The default is `Roles`
|
27
27
|
* You can assign multiple roles seperated by `ARRAY_TAG_DELIMITER` (default: `,`)
|
28
28
|
* Also, you can express levels of roles delimited by `ROLE_TAG_DELIMITER` (default `:`)
|
29
29
|
* Example: admin:ami, then `EC2::Host.new(role: 'admin:ami')` and also `EC2::Host.new(role1: 'admin')` returns this host
|
30
|
-
* **ROLE_TAG_DELIMITER**: A delimiter to express levels of roles. Default is `:`
|
31
|
-
* **OPTIONAL_STRING_TAGS**: You may add optional non-array tags. You can specify multiple tags like `Service,Status`.
|
32
|
-
* **OPTIONAL_ARRAY_TAGS**: You may add optional array tags. Array tags allows multiple values delimited by `ARRAY_TAG_DELIMITER` (default: `,`)
|
33
|
-
* **ARRAY_TAG_DELIMITER**: A delimiter to express array. Default is `,`
|
34
|
-
* **LOG_LEVEL**: Log level such as `info`, `debug`, `error`. The default is `info`.
|
30
|
+
* **ROLE_TAG_DELIMITER (optional)**: A delimiter to express levels of roles. Default is `:`
|
31
|
+
* **OPTIONAL_STRING_TAGS (optional)**: You may add optional non-array tags. You can specify multiple tags like `Service,Status`.
|
32
|
+
* **OPTIONAL_ARRAY_TAGS (optional)**: You may add optional array tags. Array tags allows multiple values delimited by `ARRAY_TAG_DELIMITER` (default: `,`)
|
33
|
+
* **ARRAY_TAG_DELIMITER (optional)**: A delimiter to express array. Default is `,`
|
34
|
+
* **LOG_LEVEL (optional)**: Log level such as `info`, `debug`, `error`. The default is `info`.
|
35
35
|
|
36
|
-
See [
|
36
|
+
See [sample.conf](./sample.conf)
|
37
37
|
|
38
38
|
## Tag Example
|
39
39
|
|
@@ -120,7 +120,7 @@ Usage: ec2-host [options]
|
|
120
120
|
--private-ip, --ip show private ip address instead of hostname
|
121
121
|
--public-ip show public ip address instead of hostname
|
122
122
|
-i, --info show host info
|
123
|
-
-j, --
|
123
|
+
-j, --jsonl show host info in line delimited json
|
124
124
|
--json show host info in json
|
125
125
|
--pretty-json show host info in pretty json
|
126
126
|
--debug debug mode
|
data/ec2-host.gemspec
CHANGED
data/lib/ec2/host/cli.rb
CHANGED
@@ -61,8 +61,8 @@ class EC2
|
|
61
61
|
op.on('-i', '--info', "show host info") {|v|
|
62
62
|
opts[:info] = v
|
63
63
|
}
|
64
|
-
op.on('-j', '--
|
65
|
-
opts[:
|
64
|
+
op.on('-j', '--jsonl', "show host info in line delimited json") {|v|
|
65
|
+
opts[:jsonl] = v
|
66
66
|
}
|
67
67
|
op.on('--json', "show host info in json") {|v|
|
68
68
|
opts[:json] = v
|
@@ -96,7 +96,7 @@ class EC2
|
|
96
96
|
hosts.each do |host|
|
97
97
|
$stdout.puts host.info
|
98
98
|
end
|
99
|
-
elsif options[:
|
99
|
+
elsif options[:jsonl]
|
100
100
|
hosts.each do |host|
|
101
101
|
$stdout.puts host.to_hash.to_json
|
102
102
|
end
|
@@ -123,7 +123,7 @@ class EC2
|
|
123
123
|
|
124
124
|
def condition
|
125
125
|
return @condition if @condition
|
126
|
-
_condition = HashUtil.except(options, :info, :
|
126
|
+
_condition = HashUtil.except(options, :info, :jsonl, :json, :pretty_json, :debug, :private_ip, :public_ip)
|
127
127
|
@condition = {}
|
128
128
|
_condition.each do |key, val|
|
129
129
|
if tag = Config.optional_options[key.to_s]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ec2-host
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naotoshi Seo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -216,7 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
216
216
|
version: '0'
|
217
217
|
requirements: []
|
218
218
|
rubyforge_project:
|
219
|
-
rubygems_version: 2.
|
219
|
+
rubygems_version: 2.4.5
|
220
220
|
signing_key:
|
221
221
|
specification_version: 4
|
222
222
|
summary: Search hosts on AWS EC2
|