le1t0-deprec 2.1.6.019 → 2.1.6.020
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/lib/deprec/recipes/nagios.rb +5 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -152,7 +152,11 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
152
152
|
if nagios_known_hosts.size > 0
|
153
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
154
|
tmp_out_file = "/tmp/known_hosts_#{Time.now.strftime("%Y%m%d%H%M%S")}.txt"
|
155
|
-
|
155
|
+
run "ssh-keyscan -f #{tmp_file} -t rsa > #{tmp_out_file}"
|
156
|
+
run "rm -f #{tmp_file}"
|
157
|
+
sudo "cp #{tmp_out_file} ~nagios/.ssh/known_hosts"
|
158
|
+
run "rm -f #{tmp_out_file}"
|
159
|
+
sudo "chown #{nagios_user}:#{nagios_group} ~nagios/.ssh/known_hosts"
|
156
160
|
end
|
157
161
|
end
|
158
162
|
|