So, I've populated a YAML file and loaded it into my Vagrantfile successfully (see below). I know it works, because the "print" statement prints out the value.
When I try to assign that value to one of the node variables, though, the variable remains empty.
Any ideas?
config.yaml
-----------
os.username: 'myuser'
Vagrantfile
-----------
# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'yaml'
current_dir = File.dirname(File.expand_path(__FILE__))
config = YAML.load_file("#{current_dir}/config.yaml")
# THIS WORKS!
print config['os.username']
Vagrant.configure("2") do |config|
config.vm.define "pupstack" do |pupstack|
# THIS DOESN'T WORK
os.username = config['os.username']