Guest User

Untitled

a guest
Nov 21st, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. if File.exist?("/etc/facts.txt")
  2. File.readlines("/etc/facts.txt").each do |line|
  3. if line =~ /^(.+)=(.+)$/
  4. var = $1; val = $2
  5.  
  6. Facter.add(var) do
  7. setcode { val }
  8. end
  9. end
  10. end
  11. end
Add Comment
Please, Sign In to add comment