CapPuppet

Apply local Puppet manifests when deploying your project with Capistrano.

Disclaimer

This is still in very early stages of development. I have only tested this on a local prototype project, and so far it appears to be working according to this document. I already have a few ideas that will dramatically change the way this currently works. Use at your own risk, there will be updates soon

Installation

Add this line to your application's Gemfile:

gem 'cap_puppet'

And then execute:

$ bundle

Or install it yourself as:

$ gem install cap_puppet

Usage

This assumes that you've "capified" your application.

Simply include the CapPuppet recipe inside of config/deploy.rb like so:

require "cap_puppet/capistrano"

The default values assume the following files and directories exist:

config/puppet/manifests/default.pp
config/puppet/modules

The default.pp is the manifest that will be executed after deploy:update_code Any required modules can be placed inside of the modules directory.

Settings

If you're not fond of the default values, there are some setting to override them:

puppet_path:
  Default Value: `release_path`/config/puppet
  The base path for Puppet manifests and modules.
  Expects the puppet_path to have ./modules and ./manifests

puppet_command:
  Default Value: puppet
  The command to execute Puppet.

puppet_modules_path:
  Default Value: `puppet_path`/modules
  The path where the Puppet modules are stored.

puppet_manifests_path:
  Default Value: `puppet_path`/manifests
  The path where the Puppet manifests are stored.

puppet_manifest:
  Default Value: `puppet_manifest_path`/default.pp
  The manifest that should be applied in the `puppet_manifest_path`

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

License

MIT