I created a custom fact file to generate home_$user entries for all users on the system containing their respective home directories:
require 'etc' while pwEnt = Etc.getpwent do name = pwEnt.name home = pwEnt.dir var = "home_#{name}" Facter.add(var) do setcode do home end end end Etc.endpwent When I use it though every home_$user entry has the same value (the home directory of the last user it processed). I can add print statements and see that the loop is getting the right information. What am I doing wrong or not understanding? Thanks...James -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAPWHxf%2B_19hmfxxfrccNPi1qSsN29aLwSMhaXMRSsAAuXsEqQQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.