No commit activity in last 3 years
No release in over 3 years
Vagrant plugin which allows manipulation of puppet.conf from VagrantFile
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

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

Add the following to your Vagrantfile:

require '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

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request