projects
/
mirror
/
dsa-puppet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2be2b37
)
Add a facter that collects ssh keys of the portforwarder user
author
Peter Palfrader
<peter@palfrader.org>
Sun, 21 Feb 2010 12:52:00 +0000
(13:52 +0100)
committer
Peter Palfrader
<peter@palfrader.org>
Sun, 21 Feb 2010 12:52:00 +0000
(13:52 +0100)
facts/portforwarder.rb
[new file with mode: 0644]
patch
|
blob
diff --git a/facts/portforwarder.rb
b/facts/portforwarder.rb
new file mode 100644
(file)
index 0000000..
f7eeb91
--- /dev/null
+++ b/
facts/portforwarder.rb
@@ -0,0
+1,14
@@
+Facter.add("portforwarder") do
+ setcode do
+ key = nil
+ keyfile = '/home/portforwarder/.ssh/id_rsa.pub'
+ if FileTest.exist?(keyfile)
+ key = File.open(keyfile).read.chomp
+ end
+ key
+ end
+end
+
+# vim:set et:
+# vim:set ts=4:
+# vim:set shiftwidth=4: