lib/gogetit/cli.rb in gogetit-0.1.19 vs lib/gogetit/cli.rb in gogetit-0.2.0
- old
+ new
@@ -26,11 +26,14 @@
Gogetit.libvirt.create(name)
else
abort('Invalid argument entered.')
end
# post-tasks
- knife_bootstrap(name, type, Gogetit.config) if options[:chef]
+ if options[:chef]
+ knife_bootstrap(name, type, Gogetit.config)
+ update_vault(Gogetit.config)
+ end
Gogetit.config[:default][:user] ||= ENV['USER']
puts "ssh #{Gogetit.config[:default][:user]}@#{name}"
end
desc 'destroy NAME', 'Destroy either a container or KVM domain.'
@@ -46,10 +49,13 @@
else
abort('Invalid argument entered.')
end
end
# post-tasks
- knife_remove(name) if options[:chef]
+ if options[:chef]
+ knife_remove(name) if options[:chef]
+ update_vault(Gogetit.config)
+ end
end
desc 'rebuild NAME', 'Destroy and create either a container or KVM domain again.'
def rebuild(type=nil, name)
invoke :destroy, [name]