anamo 1.1.2 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/anamo/node/thor.rb +23 -5
- data/lib/anamo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 845201f9967d87fb7043ce35eb82d327ad9b02121e3b1cb6f7786c3547babefd
|
4
|
+
data.tar.gz: d4a55a753e79d4af2796c8b61166e059a10619a7ca490ad85213bad4269e6e3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9b87dcc52b8e297c25e7075aa815f974c425ec6f1b2b3c4756edb6524ed8eafd55c1bee219fbbaf1eb8275237d27c55d24b2ced9453249b70ff3b93b6fe2aa2
|
7
|
+
data.tar.gz: c6c80048b96218a70c23a938ab22d523cc21b123b6f65fdcc8fc93187dd2dc836bfea5c1ebe3df354fef023f94be46cce39f1a4396c945e5345d7d3dc1c8a235
|
data/lib/anamo/node/thor.rb
CHANGED
@@ -38,7 +38,11 @@ module Anamo
|
|
38
38
|
ret = {}
|
39
39
|
|
40
40
|
config = YAML.load_file "/etc/anamo.conf.yml"
|
41
|
+
|
42
|
+
#train
|
41
43
|
train = Train.create('local')
|
44
|
+
# start or reuse a connection
|
45
|
+
conn = train.connection
|
42
46
|
|
43
47
|
ret['api_key'] = config['api_key']
|
44
48
|
ret['beacon_modules'] = config['modules']
|
@@ -48,15 +52,29 @@ module Anamo
|
|
48
52
|
ret['node']['os_name'] = Train.create('local').connection.os[:name]
|
49
53
|
ret['node']['os_family'] = Train.create('local').connection.os[:family]
|
50
54
|
ret['node']['os_release'] = Train.create('local').connection.os[:release]
|
55
|
+
|
56
|
+
# run a command on Linux/Unix/Mac
|
57
|
+
ret['node']['cpe'] = conn.run_command('hostnamectl | grep "Static hostname: "').stdout
|
58
|
+
ret['node']['chassis'] = conn.run_command('hostnamectl | grep "Chassis: "').stdout
|
59
|
+
ret['node']['machine_id'] = conn.run_command('hostnamectl | grep "Machine ID: "').stdout
|
60
|
+
ret['node']['boot_id'] = conn.run_command('hostnamectl | grep "Boot ID: "').stdout
|
61
|
+
ret['node']['virtualization'] = conn.run_command('hostnamectl | grep "Virtualization: "').stdout
|
62
|
+
ret['node']['operating_system'] = conn.run_command('hostnamectl | grep "Operating System: "').stdout
|
63
|
+
ret['node']['kernel'] = conn.run_command('hostnamectl | grep "Kernel: "').stdout
|
64
|
+
ret['node']['architecture'] = conn.run_command('hostnamectl | grep "Architecture: "').stdout
|
65
|
+
|
66
|
+
#Uname (General)
|
51
67
|
ret['node']['uname_sysname'] = Uname.sysname # => The operating system name. e.g. "SunOS"
|
52
68
|
ret['node']['uname_machine'] = Uname.machine # => The machine hardware type. e.g. "i686"
|
53
69
|
ret['node']['uname_version'] = Uname.version # => The operating system version. e.g. "5.8". Windows includes patch information.
|
54
70
|
ret['node']['uname_release'] = Uname.release # => The operating system release. e.g. "2.2.16-3"
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
ret['node']['
|
71
|
+
|
72
|
+
#Uname (Solaris-Only)
|
73
|
+
#ret['node']['uname_architecture'] = Uname.architecture # => Returns the instruction set architecture. e.g. "sparc"
|
74
|
+
#ret['node']['uname_platform'] = Uname.platform # => The platform identifier. e.g. "SUNW,Sun-Blade-100"
|
75
|
+
#ret['node']['uname_isa_list'] = Uname.isa_list # => List of supported instr. sets, e.g. "amd64 pentium_pro+mmx pentium_pro"
|
76
|
+
#ret['node']['uname_hw_provider'] = Uname.hw_provider # => The name of the hardware manufacturer.
|
77
|
+
#ret['node']['uname_hw_serial_number'] = Uname.hw_provider # => Uname.hw_serial_number # => The hardware serial number
|
60
78
|
|
61
79
|
puts ret if output
|
62
80
|
|
data/lib/anamo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anamo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anamo, Inc.
|
@@ -95,7 +95,7 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name: sys
|
98
|
+
name: sys-uname
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - ">="
|