Re: Config Merge Question

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Config Merge Question

Mark Waddle
Hi Jay - Which aws plugin are you referring to?

On Saturday, December 22, 2012 6:39:18 PM UTC-8, Jay Flowers wrote:
I figured it out.  I did not realize that the aws plugin was storing boxes in dir other than the default.


On Sat, Dec 22, 2012 at 10:31 AM, Jay Flowers <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="Qbt5-Zw_d50J">jay.f...@...> wrote:
So I am trying to work on the aws plugin to vagrant, upgrading it to dev 1.0.6.  I am confused about how the config merging is working.  I was expecting that if I had a Vagrantfile in a basebox like:

/Users/flowersj/.vagrant.d/boxes/cloudss-test-aws/Vagrantfile

Vagrant::Config.run do |config|
    config.aws.region = "us-east-1"
    config.aws.availability_zone = nil  # Let AWS choose
    config.aws.image = "ami-e365e78a"   # EBS-backed CentOS 6.3 x86_64 chef
    config.aws.username = "ec2-user"
    config.aws.security_groups = ["default"]
    config.aws.flavor = "m1.small"
    config.vm.base_mac = "000000000000"
   config.vm.provision :chef_client do |chef|
     chef.chef_server_url = 'https://redacted.com'
     chef.validation_key_path = ENV['Chef_Validation_Key'] || File.dirname(File.dirname(File.dirname(File.dirname(File.dirname(__FILE__))))) + '/.chef/validation.pem'
     chef.add_recipe "cloudss::default"
     chef.environment = "test"
   end
end

the values would be accessible in an action class like so:

env[:vm].config.aws.region

When I try and debug load and merge of the config files I do not see the box config getting merged back into the environment's config attribute.

Are my expectations that the values set in the base box be accessible thought env[:vm].config corrrect, or do I misunderstand?
If my expectations are correct am I doing something wrong or is this a bug in vagrant?
I doubt that it is a bug in vagrant...

Thanks,

--
Jay Flowers
----------------------------------------------------------------------
http://jayflowers.com
---------------------------------------------------------------------



--
Jay Flowers
----------------------------------------------------------------------
http://jayflowers.com
---------------------------------------------------------------------

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.