Added amanda module

This commit is contained in:
Ossi Salmi 2011-10-04 16:43:12 +03:00 committed by Timo Mkinen
parent 1389ec553e
commit 8217a3b0f8
3 changed files with 126 additions and 0 deletions

View file

@ -0,0 +1,27 @@
Facter.add('amanda_serverkey') do
setcode do
begin
match = File.read('/var/lib/amanda/.ssh/id_rsa_amdump.pub')[/^ssh-rsa ([^ ]+)/, 1]
if match
data = match
end
rescue
data = ''
end
data
end
end
Facter.add('amanda_clientkey') do
setcode do
begin
match = File.read('/var/lib/amanda/.ssh/id_rsa_amrecover.pub')[/^ssh-rsa ([^ ]+)/, 1]
if match
data = match
end
rescue
data = ''
end
data
end
end