knife-stalenodes 1.0.0 → 1.0.1

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.
@@ -57,6 +57,12 @@ module KnifeStalenodes
57
57
  :description => "Adds minutes to hours since last check in",
58
58
  :default => 0
59
59
 
60
+ option :maxhost,
61
+ :short => "-n HOSTS",
62
+ :long => "--number HOSTS",
63
+ :description => "Max number of hosts to search",
64
+ :default => 2500
65
+
60
66
 
61
67
  def calculate_time
62
68
  seconds = config[:days].to_i * 86400 + config[:hours].to_i * 3600 + config[:minutes].to_i * 60
@@ -101,7 +107,8 @@ module KnifeStalenodes
101
107
  search_args = { :keys => {
102
108
  :ohai_time => ['ohai_time'],
103
109
  :name => ['name']
104
- }
110
+ },
111
+ :rows => config[:maxhost]
105
112
  }
106
113
 
107
114
  query.search(:node, get_query, search_args).first.each do |node|
@@ -1,5 +1,6 @@
1
1
 
2
2
  module KnifeStalenodes
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  MAJOR, MINOR, TINY = VERSION.split('.')
5
- end
5
+ end
6
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-stalenodes
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: