Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- define :github, :user => "root", :home => "/root", :group => "" do
- package "git-core"
- group = params[:group].empty? ? params[:user] : params[:group]
- directory "#{params[:home]}/.ssh" do
- mode "0700"
- owner params[:user]
- group group
- recursive true
- end
- cookbook_file "#{params[:home]}/.ssh/github" do
- source "github-ssh-key"
- mode "0600"
- owner params[:user]
- group group
- end
- file "#{params[:home]}/.ssh/config" do
- owner params[:user]
- group group
- content <<-EOH
- Host github.com
- IdentityFile ~/.ssh/github
- IdentitiesOnly yes
- StrictHostKeyChecking no
- EOH
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment