Skip to content

Instantly share code, notes, and snippets.

@acidprime
Created May 4, 2015 16:41
Show Gist options
  • Save acidprime/c53da053c92f52291165 to your computer and use it in GitHub Desktop.
Save acidprime/c53da053c92f52291165 to your computer and use it in GitHub Desktop.
Facter.add('root_ssh_key') do
setcode do
pubkey = '/root/.ssh/id_rsa.pub'
File.read(pubkey).split[1] if File.exists? pubkey
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment