chef_knives 0.3.2 → 0.3.3
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.
- data/AUTHORS +3 -0
- data/History.txt +8 -3
- data/Manifest.txt +1 -0
- data/bin/chef_node_find +15 -8
- data/chef_knives.gemspec +1 -1
- data/lib/chef/knives.rb +1 -1
- metadata +2 -1
data/AUTHORS
ADDED
data/History.txt
CHANGED
@@ -1,12 +1,17 @@
|
|
1
|
-
=== 0.3.
|
1
|
+
=== 0.3.3 / 2009-11-11
|
2
|
+
|
3
|
+
* fixes in chef_node_find
|
4
|
+
* added --no-ifaces flag to chef_node_find
|
5
|
+
|
6
|
+
=== 0.3.2 / 2009-11-11
|
2
7
|
|
3
8
|
* fixes in chef_node_fs_usage
|
4
9
|
|
5
|
-
=== 0.3.1 / 2009-11-
|
10
|
+
=== 0.3.1 / 2009-11-11
|
6
11
|
|
7
12
|
* fixes in chef_node_fs_usage
|
8
13
|
|
9
|
-
=== 0.3 / 2009-11-
|
14
|
+
=== 0.3 / 2009-11-10
|
10
15
|
|
11
16
|
* chef_node_find script added
|
12
17
|
|
data/Manifest.txt
CHANGED
data/bin/chef_node_find
CHANGED
@@ -35,10 +35,15 @@ def main
|
|
35
35
|
|
36
36
|
option :match do
|
37
37
|
default '.*'
|
38
|
-
long '--match'
|
38
|
+
long '--match=REGEXP'
|
39
39
|
short '-m'
|
40
40
|
desc 'Match only the nodes with an FQDN matching this value'
|
41
41
|
end
|
42
|
+
|
43
|
+
option :no_ifaces do
|
44
|
+
long '--no-ifaces'
|
45
|
+
desc 'Do not print network interfaces'
|
46
|
+
end
|
42
47
|
end
|
43
48
|
|
44
49
|
db = CouchRest.database(CHEF_DB_URL)
|
@@ -55,14 +60,16 @@ def main
|
|
55
60
|
puts "Uptime: " + node.uptime
|
56
61
|
puts "Memory Total: " + humanize_bytes(node.memory.total.gsub('kB','').to_i * 1024)
|
57
62
|
puts "Memory Free: " + humanize_bytes(node.memory.free.gsub('kB','').to_i * 1024)
|
58
|
-
puts "Network Interfaces: "
|
59
63
|
puts "Is a Virtual Machine?: #{(node.virtualization.role == 'guest') rescue false}"
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
64
|
+
if not Choice.choices[:no_ifaces]
|
65
|
+
puts "Network Interfaces: "
|
66
|
+
node.network.interfaces.each_key do |iface|
|
67
|
+
next unless node.network.interfaces[iface][:addresses]
|
68
|
+
puts " #{iface}"
|
69
|
+
node.network.interfaces[iface].addresses.each_key do |a|
|
70
|
+
print " #{a}".ljust(30)
|
71
|
+
puts " [#{node.network.interfaces[iface].addresses[a].family}]"
|
72
|
+
end
|
66
73
|
end
|
67
74
|
end
|
68
75
|
puts
|
data/chef_knives.gemspec
CHANGED
data/lib/chef/knives.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef_knives
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergio Rubio
|
@@ -37,6 +37,7 @@ extra_rdoc_files:
|
|
37
37
|
- Manifest.txt
|
38
38
|
- README.txt
|
39
39
|
files:
|
40
|
+
- AUTHORS
|
40
41
|
- History.txt
|
41
42
|
- Manifest.txt
|
42
43
|
- README.txt
|