le1t0-deprec 2.1.6.021 → 2.1.6.022

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/CHANGELOG +4 -0
  2. data/lib/deprec/recipes/nagios.rb +3 -1
  3. metadata +3 -3
data/CHANGELOG CHANGED
@@ -1,5 +1,9 @@
1
1
  # deprec changelog
2
2
 
3
+ = 2.1.6.022 (Jul 7, 2010)
4
+
5
+ * add to known hosts for IP addresses as well as hostnames for nagios recipe
6
+
3
7
  = 2.1.6.021 (Jul 5, 2010)
4
8
 
5
9
  * fixed writing known hosts file
@@ -149,8 +149,10 @@ Capistrano::Configuration.instance(:must_exist).load do
149
149
  deprec2.push_configs(:nagios, SYSTEM_CONFIG_FILES[:nagios])
150
150
  config_check
151
151
  restart
152
+ require 'socket'
152
153
  if nagios_known_hosts.size > 0
153
- put (nagios_known_hosts << "").join("\n"), tmp_file = "/tmp/ssh_keyscan_#{Time.now.strftime("%Y%m%d%H%M%S")}.txt", :mode => 0644
154
+ hosts_and_ips = (nagios_known_hosts + nagios_known_hosts.collect { |h| Socket.getaddrinfo(h, 0, Socket::AF_INET, Socket::SOCK_STREAM, Socket::IPPROTO_TCP, Socket::INADDR_ANY).first[3] })
155
+ put (hosts_and_ips + [""]).join("\n"), tmp_file = "/tmp/ssh_keyscan_#{Time.now.strftime("%Y%m%d%H%M%S")}.txt", :mode => 0644
154
156
  tmp_out_file = "/tmp/known_hosts_#{Time.now.strftime("%Y%m%d%H%M%S")}.txt"
155
157
  run "ssh-keyscan -f #{tmp_file} -t rsa > #{tmp_out_file}"
156
158
  run "rm -f #{tmp_file}"
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 2
7
7
  - 1
8
8
  - 6
9
- - 21
10
- version: 2.1.6.021
9
+ - 22
10
+ version: 2.1.6.022
11
11
  platform: ruby
12
12
  authors:
13
13
  - Le1t0
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-05 00:00:00 +02:00
18
+ date: 2010-07-07 00:00:00 +02:00
19
19
  default_executable: depify
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency