Last active
August 29, 2015 14:05
-
-
Save ranjib/335e301fe2ad803b41b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'blender/chef' | |
init(:ssh, user: 'some', password: ask('Pass: '), stdout: $stdout) | |
init(:chef, config_file: 'knife.rb') | |
members search(:chef, '*:*') | |
ssh_task 'run chef' do | |
execute 'sudo chef-client --no-fork' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'lxc' | |
init(:ssh, user: 'ubuntu', password: 'ubuntu', stdout: $stdout) | |
# can be set manually as well | |
#members( ['10.0.3.1', '10.0.3.2']) | |
members( LXC.list_containers.map{|n| LXC::Container.new(n).ip_addresses.first}) | |
ssh_task('check memory') do | |
execute('free -m') | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment