Vagrant::Puppetconf
Edit/update puppet.conf from Vagrantfile
Example use case: Vagrant box is configured differently based on the environment setting in puppet.conf and you want to be able to easily switch between environments.
Installation
Add this line to your application's Gemfile:
gem 'vagrant-puppetconf'
And then execute:
$ bundle
Or install it yourself as:
$ gem install vagrant-puppetconf
Usage
There are two configuration options: update_only - if set to false, will clear the value and only add configuration options that you specify.
updates - takes a hash where the keys are config keys and the values are config values.
Example Vagrant file:
Vagrant::Config.run do |config|
config.vm.box = "lucid32"
config.puppetconf.update_only = false # Overwrite all existing values
config.puppetconf.updates = {'main/environment' => 'test'} # Set environment to test
end
Additional commands:
Updates any puppet.conf config on the fly.
vagrant puppetconf -k main/environment -v test
Update puppet.conf environment config on the fly.
vagrant puppetenv test
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request