# Bootstrap doesn't permanent set policy\_name and policy\_group

**URL:** <https://discourse.chef.io/t/bootstrap-doesnt-permanent-set-policy-name-and-policy-group/10979>\
**Category:** Chef Infra (archive)\
**Created:** [June 4, 2017, 6:23pm UTC](https://discourse.chef.io/t/bootstrap-doesnt-permanent-set-policy-name-and-policy-group/10979 "2017-06-04T18:23:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bryce](https://avatars.discourse-cdn.com/v4/letter/b/8edcca/32.png) [@Bryce](https://discourse.chef.io/u/Bryce)\
**Post date:** [June 4, 2017, 6:23pm UTC](https://discourse.chef.io/t/bootstrap-doesnt-permanent-set-policy-name-and-policy-group/10979/1 "2017-06-04T18:23:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![thommay](https://avatars.discourse-cdn.com/v4/letter/t/f08c70/32.png) [@thommay](https://discourse.chef.io/u/thommay)\
**Post date:** [June 5, 2017, 10:38am UTC](https://discourse.chef.io/t/bootstrap-doesnt-permanent-set-policy-name-and-policy-group/10979/2 "2017-06-05T10:38:06Z")

</div>

Can you file this as a bug at [https://github.com/chef/knife-windows/issues/new](https://github.com/chef/knife-windows/issues/new), please, and we’ll get it fixed.

Thanks,  
-Thom

---

<div class="post-metadata">

**Author:** ![Bryce](https://avatars.discourse-cdn.com/v4/letter/b/8edcca/32.png) [@Bryce](https://discourse.chef.io/u/Bryce)\
**Post date:** [June 5, 2017, 3:32pm UTC](https://discourse.chef.io/t/bootstrap-doesnt-permanent-set-policy-name-and-policy-group/10979/3 "2017-06-05T15:32:18Z")

</div>

Done - much obliged.

[https://github.com/chef/knife-windows/issues/432](https://github.com/chef/knife-windows/issues/432)
