Open lcreid opened 5 years ago
Setting the host name to the directory was pretty easy. The problem is that it doesn't change the host name in /etc/hosts
. I don't know how much of a problem that's going to be.
P.S. The answer to changing the host name was to make a provisioner that ran:
hostnamectl set-hostname '#{File.basename(Dir.getwd)}'
What's still missing is setting the host file. It looks like there's no "built-in" way to do this. I just have to script a sed
command or something in the provider, to modify /etc/hosts
.
When running more than one box, it's hard to tell which box is which. It would be wonderful if the host name of the box could set itself to something interesting, like perhaps the directory name on the host where the box resides.