Never used Ruby but this seems straight forward enough having looked at a few examples - not working - what am I missing?
vmconfig.yml:
server:
hostname: mydomain.com
Vagrantfile:
require 'yaml'
vmconfig = YAML.load_file('vmconfig.yml')
Vagrant.configure(2) do |config|
config.vm.box = "debian/contrib-jessie64"
config.vm.provision "shell", inline: <<-SHELL
apt-get update
hostname vmconfig["server"]["hostname"]
config.vm.synced_folder ".", "/vagrant", type: "virtualbox"
end
hostname is not set (to what config file should) when VM is finished building??? If I hardcode the value it works fine???