hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.27k stars 4.43k forks source link

Need a method, similar to chef.json that will provide the highest level of override #8101

Closed axos88 closed 7 years ago

axos88 commented 7 years ago

In the chef provisioner, I would like to see a method to define attributes at the highest level (maybe automatic, through the installation of an ohai plugin?), in order to be able to override things that are specific to the vagrant run:

The problem I am facing is that some wrapper cookbooks already have 'override'-s defined, and there seems to be no way to override those to fit the vagrant environment, as chef.json seems to operate on the normal level.

chef.automatic = {
  nginx: {
    user: 'vagrant'
  }
}

This could drop a file similar to dna.json into the ohai plugins directory, to make these attributes be on automatic level.

chrisroberts commented 7 years ago

This should give you what you're looking for:

https://www.vagrantup.com/docs/provisioning/chef_common.html#json

Cheers!

axos88 commented 7 years ago

Please reopen, and read the issue more carefully. That option gives normal-level attributes, which are overridden by any overrides defined in a cookbook.

axos88 commented 7 years ago

@chrisroberts

axos88 commented 7 years ago

@chrisroberts

ghost commented 4 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.