One option is to use sed
to edit the files. This lets you limit what variables get filled in.
This will fill in template.txt and output it to filled.txt:
sed -e "s/\$HOSTNAME/$HOSTNAME/" -e "s/\$USER/$USER/" template.txt > filled.txt
template.txt:
server name: $HOSTNAMEcurrent user: $USER
filled.txt:
server name: ubuntu-servercurrent user: leafar