Marek Mrowca
Marek Mrowca

Reputation: 21

Chef create policygroup

I want to bootstrap a node with Policyfile, but I need a policy group to perform this. However, the chef's documentation does not mention how to create a policy group. There is a command for deleting, but none for creation: https://docs.chef.io/policyfile.html#chef-delete-policy-group

I tried too google it, with no luck. Any help will be appreciated!

Regards, Marek

Upvotes: 1

Views: 1274

Answers (2)

coderanger
coderanger

Reputation: 54249

Policy groups aren't a thing you have to create. They are summoned into existence when you chef push to them. they also don't actually hold any information, it's more like a "tag" on the compiled policy when uploaded rather than a Big Fancy Object like we use for other things in Chef.

Upvotes: 1

JackChance
JackChance

Reputation: 520

https://blog.chef.io/2015/08/18/policyfiles-a-guided-tour/

An except from the above blog that you will find useful:

"...

chef provision staging --sync -n aar-staging-01 -o port=8000

That will sync our local policy lock to a policy group called ‘staging’ (creating that policy group in the process), then run an embedded Chef Client which creates a VM (via Chef Provisioning), configures it and converges it... "

So it looks like chef provision is the syntax you're looking for.

Upvotes: 0

Related Questions