Skip to content
Get capistrano hosts from puppet
Find file
Latest commit 647d01e @garethr corrections to README


If you're using Puppet you already have a list of the hosts and types of hosts under your control. So why duplicate this information in your capistrano configuration? Every time you provision or destroy a new machine you have to remember to update your deployment configuration and that's just an error waiting to happen.

This requires you to be running my web-puppet service to get at the relevant host and tag information.

A sample capistrano configuration might look like the following. The only important parts are the require, creating a new server instance and the calls to get_servers to return a list of hosts.

    require 'capistrano-puppet'

    web_puppet ='http://username:password@localhost:9295')

    set :application, "test"
    set :repository, "."
    set :scm, :none
    set :deploy_via, :copy

    default_run_options[:pty] = true
    set :deploy_to, '/server/path/'
    set :user, 'deploy'
    set :use_sudo, false

    role :web do

    role :app do

Note that this is the first release as is really just a proof of concept. Running web-puppet in environments with lots of hosts will likely be very slow.

The code was inspired by capistrano-cobbler, which uses Cobbler rather than web-puppet to get the host information.
Something went wrong with that request. Please try again.