Questions tagged [chef-policyfile]

7 questions
1
vote
2 answers

Chef Policyfile.rb `include_policy` doesn't guarantee immutability of policy dependency

Let's say I have a Polcyfile.rb in a cookbook called motd: name 'motd' default_source :chef_repo, "../" include_policy "Policyfile", path: "../environment" run_list 'motd' and a recipes/default.rb: file '/etc/motd' do content…
ethan123
  • 1,084
  • 2
  • 14
  • 26
1
vote
1 answer

Multiple Chef Policyfiles

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…
0
votes
0 answers

chef generate attribute cookbooks/base default error

I am following the course instructions on chef progress website to learn chef. Currently I am working through on collecting infra code by cloning an existing repo & creating the wrapper cookbook. The problem is I run into two errors when creating…
Alfred L.
  • 53
  • 5
0
votes
1 answer

how to bind policy to node in Chef?

I'm new to chef. Recently I'm studying policyfile in chef. But I can only find how to use testkitchen to run the policy, I'm doubting -- if the policy file can only be used in testing? Is there any method to bind it to node like "knife node edit"…
EisenWang
  • 189
  • 1
  • 10
0
votes
1 answer

Chef policy installation failed with (Mixlib::ShellOut::ShellCommandFailed)

I'm new to chef. Recent days, I'm studying policy in chef. But the command "chef install " failed with error (Mixlib::ShellOut::ShellCommandFailed). Please have a look and kind help. Thanks Here's the details-- I create a cookbook named sample with…
EisenWang
  • 189
  • 1
  • 10
0
votes
1 answer

How do I change an attribute for a policy group without having to re-compile all of the policyfiles?

I am trying to shift from environment files in Chef to using Policyfiles. https://docs.chef.io/policy.html. I really like the concept, especially since you can include a policy from policy into another, but I am trying to understand how do a simple…
0
votes
1 answer

Unable to resolve a cookbook from artifactory with a Policyfile chef install

I am trying to use a Policyfile to configure an Artifactory repo as the source for a cookbook. I am using manual upload / curl to publish the cookbook to a /chef repo in artifactory (this is new too) - i wasn't able to publish with stove and want to…
Brett
  • 5,690
  • 6
  • 36
  • 63