Closed schmidtaa closed 7 years ago
I think you want knife bootstrap windows winrm
and not knife winrm
. The latter simply runs ad hoc commands on the node(s) and therefore a runlist would not be applicable. If you want to simply invoke the chef-client via knife winrm
you will need to pass it the full chef-client command.
My scenario: already existing node, need to update/install new cookbook/recipe on that node, so, need knife winrm, not bootstrap.
oh then you want to call:
knife winrm 'name:********' "chef-client -r '$runList'" --winrm-user ***** --winrm-password *********
According to knife doc, an option should allow to specify a particular role, cookbook or recipe to be executed on the node (Windows platform):
installtomcat.ps1:
$runList='recipe[apache::tomcat-install]'
knife winrm 'name:****' chef-client --winrm-user * --winrm-password ***** -r '$runList'
In reality, chef server's run_list only used instead and cookbooks and recipe are executed according to the server's run list.