I'm bootstrapping a set of windows nodes and setting --policy_name and --policy_group when doing so. This sets the policy_name and policy_group under a "normal" object when doing a knife node edit but leaves the primary set blank.
Knife Command:
knife bootstrap windows winrm "{serverFqdn.ToLower()}" --install-as-service -N "{serverFqdn.ToLower()}" -x "{runAsDomain}\{runAsUsername}" -P "{runAsKey}" --policy-group "{policyGroup}" --policy-name "{policyName}" --environment "{environmentName}""
Results In:
{
"name": "*****",
"chef_environment": "****",
"normal": {
"policy_name": "fde5dd40_d83c_49d2_81ec_d831c23273a1__cb878c47_94f2_42a1_a5dd_ef22c285310b",
"policy_group": "fde5dd40_d83c_49d2_81ec_d831c23273a1",
"tags": [ ]
},
"policy_name": "",
"policy_group": "",
"run_list": [ "recipe[default::default]"]
}
This requires us to run a knife node edit to properly set the root policy_name and policy_group resulting in:
{
"name": "",
"chef_environment": "",
"normal": {
"policy_name": "fde5dd40_d83c_49d2_81ec_d831c23273a1__cb878c47_94f2_42a1_a5dd_ef22c285310b",
"policy_group": "fde5dd40_d83c_49d2_81ec_d831c23273a1",
"tags": [ ]
},
"policy_name": "fde5dd40_d83c_49d2_81ec_d831c23273a1__cb878c47_94f2_42a1_a5dd_ef22c285310b",
"policy_group": "fde5dd40_d83c_49d2_81ec_d831c23273a1",
"run_list": [ "recipe[default::default]"]
}
A "chef-client" run will then successfully pull down updated revisions of the policy_name.
Version Info:
Chef Development Kit Version: 1.3.43
chef-client version: 12.19.36
delivery version: master (dd319aa632c2f550c92a2172b9d1226478fea997)
berks version: 5.6.4
kitchen version: 1.16.0
Any thoughts on how I could set those fields during the bootstrap process?
thanks!
Bryce