chef policy group setting: Policyfile does not support setting the run_list in json data

ε祈祈猫儿з 提交于 2020-06-01 05:09:26

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!