问题
I have followed the steps in below article I am getting following error
Unexpected Error: ----------------- Chef::PolicyBuilder::Policyfile::UnsupportedFeature: Policyfile does not support setting the run_list in json data.
here are the steps I followed
include_recipe 'basecookbook::default'
directory 'C:/ProgramData/ChefFiles' do
inherits true
action :create
end
Updated cooksbooks metadata to specify dependency on base
The policy file is as follows cookbooks/test01/Policyfile.rb Changed the policy file to
name 'test01'
run_list 'test01::default'
cookbook 'test01', path: '.'
cookbook 'basecookbook', path: '../basecookbook'
the policyfile.lock.json file is as follows
"name": "test01",
"run_list": [
"recipe[test01::default]"
],
"included_policy_locks": [
],
"cookbook_locks": {
"test01": {
I pushed the policy to chef and set the node to policy group and policy
chef push test01 .\cookbooks\test01\Policyfile.lock.json
knife node policy set NodeName 'test01' 'test01'
When I run the chef client on the node, I am getting following error
Unexpected Error: Chef::PolicyBuilder::Policyfile::UnsupportedFeature: Policyfile does not support setting the run_list in json data.
来源:https://stackoverflow.com/questions/62096253/chef-policy-group-setting-policyfile-does-not-support-setting-the-run-list-in-j