Skip to content

Instantly share code, notes, and snippets.

@teohm
Created June 5, 2013 06:55
Show Gist options
  • Save teohm/5712081 to your computer and use it in GitHub Desktop.
Save teohm/5712081 to your computer and use it in GitHub Desktop.
cat Rakefile
file 'traxity.tar.gz' => Dir['sensordatad/**/*'] do |t|
sh "tar -cvzf #{t.name} #{t.prerequisites.join(' ')}"
end
file 'cookbooks.tar.gz' do
  sh 'berks install --path cookbooks'
  sh 'tar -czf cookbooks.tar.gz cookbooks'
end
namespace :chef do
 task default: 'cookbooks.tar.gz' do
   on roles(:all) do |host|
     upload! 'cookbooks.tar.gz', '/tmp/'
     execute :tar, 'xvf', "/tmp/cookbooks.tar.gz"
     execute :'chef-solo', '..............'
   end
 end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment