Last active
September 22, 2016 16:55
-
-
Save discreet/1491a17dfcc7be05de33ee63ac91f3f0 to your computer and use it in GitHub Desktop.
Find the HomeDir layout with a Fact to set the template command accordingly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'facter' | |
Facter.add("homedir_layout") do | |
confine :osfamily => 'RedHat' | |
setcode do | |
if File.exists?("/home/local") | |
layout = 'legacy' | |
else | |
layout = 'current' | |
end | |
layout | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment