Skip to content

Instantly share code, notes, and snippets.

@JonRowe
Created August 18, 2013 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonRowe/6260955 to your computer and use it in GitHub Desktop.
Save JonRowe/6260955 to your computer and use it in GitHub Desktop.
Show broken sudo support in sprinkle pre/post hooks.
set :use_sudo, false
set :ssh_options, forward_agent: true
role :app, ENV['hostname'], primary: true
default_run_options[:pty] = true
#!/usr/bin/env sprinkle -s
deploy = File.expand_path('../', __FILE__)
package :nginx, provides: :webserver do
description 'Nginx Web Server'
apt 'nginx', sudo: true do
post :install do
runner "service nginx restart", sudo: true
end
end
verify do
has_executable '/usr/sbin/nginx'
end
end
policy :project, roles: :app do
requires :webserver
end
deployment do
delivery :capistrano do
recipes "#{ deploy }/capistrano.rb"
end
source do
prefix '/usr/local'
archives '/usr/local/sources'
builds '/usr/local/build'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment