Skip to content

Instantly share code, notes, and snippets.

@lsolesen
Forked from jtimberman/boa.rb
Created November 28, 2012 08:34
Show Gist options
  • Save lsolesen/4159893 to your computer and use it in GitHub Desktop.
Save lsolesen/4159893 to your computer and use it in GitHub Desktop.
remote_file "/tmp/BOA.sh" do
source "http://files.aegir.cc/BOA.sh.txt"
mode 00755
end
execute "/tmp/BOA.sh" do
creates "/usr/local/bin/boa"
end
(1..3).each do |boa_user|
execute "Run the BOA installer" do
command "boa in-stable local [email protected] aegir.local o#{boa_user} mini"
end
user "o#{boa_user}" do
supports :manage_home => true
home "/data/disk/o#{boa_user}"
shell "/bin/bash"
end
directory "/data/disk/o#{boa_user}/.ssh" do
owner "o#{boa_user}"
mode 00700
recursive true
end
execute "Add ssh key to user" do
command 'ssh-keygen -b 4096 -t rsa -N "" -f /data/disk/o#{boa_user}/.ssh/id_rsa'
creates "/data/disk/o#{boa_user}/.ssh/id_rsa"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment