How to reference a user's home directory?
This seems like a simple question, but I'm trying to write a ~/.netrc file in a user's home directory, but I can't figure out how to find out where $HOME is. Assuming /home/$user is not a good idea for users like 'backup' on Ubuntu, or even /root has a different directory than everyone else.
Google tells me that this might not be so simple... what's the accepted practice to do this?
I applied some of Stephan's answer to create an array-like fact:
# Create a fact of ,user:homedir,user2:homedir2, (note leading and trailing ...