1

I have a case where there are many Dev environments with different topologies, meaning that some node can have multiple roles and set of roles can vary from one environment to another.

Policyfile can be mapped to some particular runlist, but in my case I need to combine multiple Policyfiles on the same node.

I saw RFC about multi-policy, which probably not implemented yet https://github.com/chef-boneyard/chef-rfc/blob/master/rfc075-multi-policy.md

The question Is Policyfile fine workflow if set of roles for one node can vary? If yes, how this could be achieved?

Thanks.

Baurito
  • 121
  • 1
  • 9
  • I think you can include other policyfiles in policyfile using `include_policy` directive. – Draco Ater Jan 17 '20 at 08:16
  • I am curious how it works on practice. Can you please provide some examples? – Baurito Jan 18 '20 at 00:00
  • You can look at the docs: https://docs.chef.io/config_rb_policyfile.html – Draco Ater Jan 19 '20 at 13:36
  • If I could take a look, I wouldn't come here :/ I need some working examples. In my understanding it's easier to combine items in runlists by just settings runlist for nodes. In case of Policyfile workflow I would have to update client.rb file, which specify configuration for which Policyfile is used. I don't know how above would scale when you have 100+ environments and each of them have different topologies, meaning that each node can mix multiple roles. – Baurito Jan 21 '20 at 18:59

1 Answers1

0

One of the solutions that I found was to use include_policy, where you can combine multiple policyfiles together.

Baurito
  • 121
  • 1
  • 9