6f6e58f4ae
getent queries the system resolver for the hostname - but it's not the resolver we're interested in. In fact, the hostname-to-be-set may already exist in DNS (becuase DNS really is a nifty thing and can do a lot of things which are not that possible with /etc/hosts alone), in which case getent will "not fail" and vagrant will believe the hostname had already been set. Instead, query hostnamectl for the "static" hostname - that's the one we will be setting, so we're ok IFF hostnamectl returns exactly what we would be setting. |
||
---|---|---|
.. | ||
change_host_name.rb | ||
configure_networks.rb | ||
halt.rb | ||
network_scripts_dir.rb | ||
nfs_client.rb | ||
rsync.rb |