Refactor rake node provisioner
This commit is contained in:
parent
6ebcfd11bb
commit
2fa693e994
|
@ -1,4 +1,4 @@
|
|||
desc "Provision home server"
|
||||
desc "My home server"
|
||||
task :callisto do
|
||||
%w{
|
||||
update
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
desc "Provision main laptop"
|
||||
desc "My work laptop"
|
||||
task :ganymede => :io
|
||||
|
|
|
@ -1,38 +1,53 @@
|
|||
desc "Provision main desktop"
|
||||
desc "My main computer"
|
||||
task :io do
|
||||
%w{
|
||||
update
|
||||
pkg:osx
|
||||
pkg:zsh
|
||||
pkg:vim
|
||||
pkg:emacs
|
||||
pkg:rbenv
|
||||
pkg:pyenv
|
||||
}.each { |task| Rake::Task[task].invoke }
|
||||
[ "update",
|
||||
"pkg:osx",
|
||||
"pkg:zsh",
|
||||
"pkg:vim",
|
||||
"pkg:emacs",
|
||||
"pkg:rbenv",
|
||||
"pkg:pyenv",
|
||||
"pkg:love"
|
||||
].each { |task| Rake::Task[task].invoke }
|
||||
|
||||
# Install my the mac-apps I commonly use
|
||||
if is_mac?
|
||||
%w{
|
||||
transmit
|
||||
transmission
|
||||
vlc
|
||||
flux
|
||||
skype
|
||||
adium
|
||||
codekit
|
||||
sequel-pro
|
||||
scrivener
|
||||
omnigraffle
|
||||
love
|
||||
[ "transmit",
|
||||
"transmission",
|
||||
"vlc",
|
||||
"flux",
|
||||
"skype",
|
||||
"adium",
|
||||
"codekit",
|
||||
"mindnode-pro",
|
||||
"sequel-pro",
|
||||
"scrivener",
|
||||
"omnigraffle",
|
||||
|
||||
qlcolorcode
|
||||
qlstephen
|
||||
qlmarkdown
|
||||
quicklook-json
|
||||
qlprettypatch
|
||||
quicklook-csv
|
||||
betterzipql
|
||||
webp-quicklook
|
||||
suspicious-package
|
||||
}.each { |app| Package.cask_install app }
|
||||
# Quicklook plugins
|
||||
"qlcolorcode",
|
||||
"qlstephen",
|
||||
"qlmarkdown",
|
||||
"quicklook-json",
|
||||
"qlprettypatch",
|
||||
"quicklook-csv",
|
||||
"betterzipql",
|
||||
"webp-quicklook",
|
||||
"suspicious-package"
|
||||
].each { |app| Package.cask_install app }
|
||||
end
|
||||
|
||||
if system("rbenv versions | grep 2.1.2 >/dev/null")
|
||||
sh_safe "rbenv install 2.1.2"
|
||||
sh_safe "rbenv global 2.1.2"
|
||||
|
||||
sh_safe "~/.rbenv/shims/gem install bundler rspec cucumber jekyll"
|
||||
end
|
||||
|
||||
if system("pyenv versions | grep 3.4.1 >/dev/null")
|
||||
sh_safe "pyenv install 3.4.1"
|
||||
sh_safe "pyenv global 3.4.1"
|
||||
|
||||
sh_safe "~/.pyenv/shims/pip install nose cython"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
desc "Provision 2nd desktop"
|
||||
desc "My media desktop"
|
||||
task :titan => :io
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
require_relative 'lib/output'
|
||||
|
||||
task :default => :update
|
||||
|
||||
desc "Update the node (based on hostname)"
|
||||
task :default, :node do |t, args|
|
||||
task :update, :node do |t, args|
|
||||
args.with_defaults(:node => `hostname`.gsub('.local', '').strip)
|
||||
Rake::Task["setup:#{args.node}"].invoke
|
||||
end
|
||||
|
||||
desc "Wipe the slate clean"
|
||||
# desc "Wipe the slate clean"
|
||||
task :destroy do
|
||||
# are you sure?
|
||||
# are you really really sure?
|
||||
|
|
Loading…
Reference in a new issue