Knife bootstrap windows


#1

Is there a way to change the chef client that is install when bootstrapping? Whenever I bootstrap a windows 10 laptop the knife outputs stating that it will install the default Windows server 2008 chef client.


#2

@Sydnguyen You can use --bootstrap-url option to customize chef-client installation or use --bootstrap-install-command 'exit 0' to skip chef-client installation. Just deploy chef-client part of your ami or vmdk.

If you’re using terraform, you can use skip_install = true from null_resource block.


#3

Thanks @suthir will the below code work in knife.rb

if[platform_version] =~ /10./
knife[:bootstrap_url] = "https://packages.chef.io/files/stable/chef/14.2.0/windows/2012r2/chef-client-14.2.0-1-x64.msi"
end

#4

@Sydnguyen yes, give it a shot.


#5

Nope


#6

@Sydnguyen try with --bootstrap-msi-url


#7

@suthir no luck, i think the if[platform_version] =~ /10./ in the knife.rb is not working cause I still see the output below.


#8

@Sydnguyen In order to fix platform_version condition, please obtain the value by running ohai platform_version on the node.


#9

Please see below

[ "10.0.17682"]

#10

@Sydnguyen Have you tried with 10.0.17682?


#11

@suthir yeah, i tried that still get the same issues.