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_test.rb | ||
configure_networks_test.rb | ||
halt_test.rb | ||
network_scripts_dir_test.rb | ||
nfs_client_test.rb | ||
rsync_test.rb |