Created
August 18, 2013 10:23
-
-
Save JonRowe/6260955 to your computer and use it in GitHub Desktop.
Show broken sudo support in sprinkle pre/post hooks.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :use_sudo, false | |
set :ssh_options, forward_agent: true | |
role :app, ENV['hostname'], primary: true | |
default_run_options[:pty] = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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