lib/deprec/recipes/xen.rb in andyh-deprec-1.99.26 vs lib/deprec/recipes/xen.rb in andyh-deprec-1.99.27

- old
+ new

@@ -58,11 +58,11 @@ task :install, :roles => :dom0 do install_deps enable_hardy_domu end - task :install_deps do + task :install_deps, :roles => :dom0 do # for amd64 version of ubuntu 7.10 apt.install( {:base => %w(linux-image-xen bridge-utils libxen3.1 python-xen-3.1 xen-docs-3.1 xen-hypervisor-3.1 xen-ioemu-3.1 xen-tools xen-utils-3.1 lvm2)}, :stable ) # alternatively, for x86 version of ubuntu: # apt-get install ubuntu-xen-server libc6-xen end @@ -73,44 +73,44 @@ deprec2.render_template(:xen, file) end end desc "Push Xen config files to server" - task :config do + task :config, :roles => :dom0 do deprec2.push_configs(:xen, SYSTEM_CONFIG_FILES[:xen]) end # Create new virtual machine # xen-create-image --force --ip=192.168.1.31 --hostname=x1 --mac=00:16:3E:11:12:31 # Start a virtual image (and open console to it) # xm create -c /etc/xen/x1.cfg desc "Start Xen" - task :start do + task :start, :roles => :dom0 do send(run_method, "/etc/init.d/xend start") end desc "Stop Xen" - task :stop do + task :stop, :roles => :dom0 do send(run_method, "/etc/init.d/xend stop") end desc "Restart Xen" - task :restart do + task :restart, :roles => :dom0 do send(run_method, "/etc/init.d/xend restart") end desc "Reload Xen" - task :reload do + task :reload, :roles => :dom0 do send(run_method, "/etc/init.d/xend reload") end - task :list do + task :list, :roles => :dom0 do sudo "xm list" end - task :info do + task :info, :roles => :dom0 do sudo "xm info" end desc "Migrate a slice on one Xen host to another. Slice is stopped, disk is tar'd up and transferred to new host." task :migrate do