From d6ede1b717eaa0e7d9ee970e5c129ff72718e3ea Mon Sep 17 00:00:00 2001 From: nielsv Date: Fri, 6 Jun 2014 14:03:58 +0200 Subject: [PATCH] added support for --use-sudo-password to provide a password for sudo --- lib/chef/knife/xenserver_vm_create.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/chef/knife/xenserver_vm_create.rb b/lib/chef/knife/xenserver_vm_create.rb index b40e02c..a155684 100644 --- a/lib/chef/knife/xenserver_vm_create.rb +++ b/lib/chef/knife/xenserver_vm_create.rb @@ -104,6 +104,10 @@ class XenserverVmCreate < Knife :long => "--ssh-password PASSWORD", :description => "The ssh password" + option :use_sudo_password, + :long => "--use-sudo-password PASSWORD", + :description => "The sudo password on the vm" + option :identity_file, :short => "-i IDENTITY_FILE", :long => "--identity-file IDENTITY_FILE", @@ -349,6 +353,7 @@ def bootstrap_for_node(vm) bootstrap.config[:environment] = config[:environment] bootstrap.config[:host_key_verify] = config[:host_key_verify] bootstrap.config[:ssh_password] = config[:ssh_password] + bootstrap.config[:use_sudo_password] = config[:use_sudo_password] bootstrap end