Facter.add("my_fact") do setcode do begin %x{/tmp/script/my_fact.py}.chomp rescue return "" end endend