0.0
No commit activity in last 3 years
No release in over 3 years
Vagrant plugin to execute chef recipes
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
 Project Readme

vagrant-recipe Gem Version

Vagrant plugin to execute chef recipes.

Description

Use this plugin to run your recipes at any time.

Example

➜ vagrant recipe SystemSetup::default

Installation

➜ vagrant plugin install vagrant-recipe

Configuration

Chef exec file and chef json config file

The root directory can be configured using Vagrantfile.

Vagrant.configure('2') do |config|
  config.vm.box = 'precise32'
  # set this value if your solo exec file is different from /tmp/vagrant-chef-1/solo.rb
  config.recipe.chef = '/tmp/vagrant-chef-1/solo.rb'
  
  # set this value if your json confi file is different from /tmp/vagrant-chef-1/dna.json
  config.recipe.json = '/tmp/vagrant-chef-1/dna.json'
end
➜ vagrant recipe SystemSetup
# is the same as
➜ vagrant ssh -c "sudo chef-solo -c /tmp/vagrant-chef-1/solo.rb -j /tmp/vagrant-chef-1/dna.json --override-runlist \"recipe[SystemSetup::default]\""

Environment variables

You can add environment variables to be exported before.

Vagrant.configure('2') do |config|
  config.vm.box = 'precise32'
  config.recipe.env['RAILS_ENV'] = 'test'
  config.recipe.env['RAILS_ROOT'] = '/vagrant'
end
➜ vagrant recipe SystemSetup
# is the same as
➜ vagrant ssh -c "export RAILS_ENV=test && export RAILS_ROOT=/vagrant && sudo chef-solo -c /tmp/vagrant-chef-1/solo.rb -j /tmp/vagrant-chef-1/dna.json --override-runlist \"recipe[SystemSetup::default]\""

Copyright

Copyright (c) 2013-2013 Raul Simiciuc. See LICENSE.md for details.