Skip to content

Instantly share code, notes, and snippets.

@armenr
Last active January 25, 2016 19:37
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 armenr/c9af67ae20d1a0849bc5 to your computer and use it in GitHub Desktop.
Save armenr/c9af67ae20d1a0849bc5 to your computer and use it in GitHub Desktop.
#
# Cookbook Name:: myapp-bot
# Recipe:: _botuser.rb
#
#
#
#
#
# Create user & group
user 'gravbot' do
supports :manage_home => true
gid 'users'
end
group 'gravbot' do
action :create
members ['gravbot']
end
# Set up ssh items
directory '/home/gravbot/.ssh' do
owner 'gravbot'
group 'gravbot'
mode '0755'
recursive true
action :create
end
file '/home/gravbot/.ssh/config' do
action :create
owner 'gravbot'
group 'gravbot'
mode '0644'
content <<-EOF
Host *
StrictHostKeyChecking no
EOF
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment