Skip to content
This repository has been archived by the owner on Jul 11, 2020. It is now read-only.

Commit

Permalink
new deploy process needs sudo without password
Browse files Browse the repository at this point in the history
dwradcliffe committed Dec 4, 2014

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent a04de54 commit af9c51f
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Berksfile.lock
Original file line number Diff line number Diff line change
@@ -288,7 +288,7 @@ GRAPH
motd (>= 0.0.0)
rubygems-ntp (0.0.3)
ntp (>= 0.0.0)
rubygems-people (0.0.29)
rubygems-people (0.0.32)
sudo (>= 0.0.0)
user (>= 0.0.0)
rubygems-redis (0.1.6)
2 changes: 1 addition & 1 deletion cookbooks/rubygems-people/metadata.rb
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
maintainer 'RubyGems.org Ops Team'
license 'MIT'
description 'RubyGems user recipes'
version '0.0.29'
version '0.0.32'

depends 'user'
depends 'sudo'
7 changes: 7 additions & 0 deletions cookbooks/rubygems-people/recipes/default.rb
Original file line number Diff line number Diff line change
@@ -53,6 +53,13 @@
end

node.default['authorization']['sudo']['groups'] = ['sysadmin']
node.default['authorization']['sudo']['include_sudoers_d'] = true
include_recipe 'sudo'

sudo 'deploy' do
user '%sysadmin'
nopasswd true
commands ['/usr/sbin/service unicorn restart', '/usr/sbin/service delayed_job restart']
end

include_recipe 'rubygems-people::meg'

0 comments on commit af9c51f

Please sign in to comment.