From 7addee4f6fce4ae9d5e2d88a42620af7a97cc2b6 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Mon, 14 May 2012 16:12:46 -0400 Subject: [PATCH] cool updates, bro --- lib/puppet-standalone-mashup/capistrano.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/puppet-standalone-mashup/capistrano.rb b/lib/puppet-standalone-mashup/capistrano.rb index c19dd6b..df72f7c 100644 --- a/lib/puppet-standalone-mashup/capistrano.rb +++ b/lib/puppet-standalone-mashup/capistrano.rb @@ -10,6 +10,20 @@ module PuppetStandaloneMashup BASE = Pathname(File.expand_path('../../..', __FILE__)) end +require 'capistrano/command' + +module Capistrano + class Command + alias :_replace_placeholders :replace_placeholders + + def replace_placeholders(command, channel) + command = _replace_placeholders(command, channel) + command.gsub!('$CAPISTRANO:TARGETHOSTNAME$', channel[:server].options[:target_hostname]) + command + end + end +end + Capistrano::Configuration.instance.load do _cset(:puppet_dir) { '/tmp/puppet' } _cset(:additional_puppet_bin_path) { nil }