specinfra 2.6.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/specinfra/command/linux/base/inventory.rb +12 -0
- data/lib/specinfra/processor.rb +15 -0
- data/lib/specinfra/version.rb +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: 5b0adaef6575657b2cdbc227a04ee4ebf68df2d5
|
|
4
|
+
data.tar.gz: 739ce66a658ed4caf0286cd96189284b80594437
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ecdf70b67fd450e1ada28eb780a3eacaa6b0ac87fab7e37b8fb4e9c3d08610c4d648bf163b397ae9f186b6a1c57eca210cc91a64cb920d9f16f3e03cff127b07
|
|
7
|
+
data.tar.gz: 206182abdc19b6ccc7ed706be3649ddaaadf9ac2f77b1bec67392e338ca1813031227d7a0d64f130d5044e5435c9b6317278a6ee2d38e0f14f323f1380a571a6
|
|
@@ -3,5 +3,17 @@ class Specinfra::Command::Linux::Base::Inventory < Specinfra::Command::Base::Inv
|
|
|
3
3
|
def get_memory
|
|
4
4
|
'cat /proc/meminfo'
|
|
5
5
|
end
|
|
6
|
+
|
|
7
|
+
def get_hostname
|
|
8
|
+
'hostname -s'
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def get_domain
|
|
12
|
+
'dnsdomainame'
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def get_fqdn
|
|
16
|
+
'hostname -f'
|
|
17
|
+
end
|
|
6
18
|
end
|
|
7
19
|
end
|
data/lib/specinfra/processor.rb
CHANGED
|
@@ -187,5 +187,20 @@ module Specinfra
|
|
|
187
187
|
def self.get_inventory_ec2
|
|
188
188
|
Specinfra::Ec2Metadata.new.get
|
|
189
189
|
end
|
|
190
|
+
|
|
191
|
+
def self.get_inventory_hostname
|
|
192
|
+
cmd = Specinfra.command.get(:get_inventory_hostname)
|
|
193
|
+
Specinfra.backend.run_command(cmd).stdout.strip
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
def self.get_inventory_domain
|
|
197
|
+
cmd = Specinfra.command.get(:get_inventory_domain)
|
|
198
|
+
Specinfra.backend.run_command(cmd).stdout.strip
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
def self.get_inventory_fqdn
|
|
202
|
+
cmd = Specinfra.command.get(:get_inventory_fqdn)
|
|
203
|
+
Specinfra.backend.run_command(cmd).stdout.strip
|
|
204
|
+
end
|
|
190
205
|
end
|
|
191
206
|
end
|
data/lib/specinfra/version.rb
CHANGED