Chef infra 用户食谱在测试厨房中失败,但在引导中工作
我有一个简单的配方,可以将用户添加到Centos 7.3机器:Chef infra 用户食谱在测试厨房中失败,但在引导中工作,chef-infra,chef-recipe,test-kitchen,Chef Infra,Chef Recipe,Test Kitchen,我有一个简单的配方,可以将用户添加到Centos 7.3机器: users_manage 'sales' do group_id 5000 action [:create] data_bag 'sales_users' end users_manage 'mechanics' do group_id 6000 action [:create] data_bag 'shop_users' end 数据包的工作原理与使用标准刀架时一样,客户端聚合配方并添加用户。。。然而。
users_manage 'sales' do
group_id 5000
action [:create]
data_bag 'sales_users'
end
users_manage 'mechanics' do
group_id 6000
action [:create]
data_bag 'shop_users'
end
数据包的工作原理与使用标准刀架时一样,客户端聚合配方并添加用户。。。然而。测试厨房失败,出现以下错误:
Error executing action `create` on resource 'users_manage[sales]'
NoMethodError
-------------
undefined method `supports' for Chef::Resource::User::LinuxUser
通过查看测试厨房的VM,我可以在/tmp/Kitchen/data_bags目录中找到数据包。这是在测试厨房中工作的,我不确定什么会阻止它工作,因为我不确定这个错误意味着什么…您正在测试厨房中安装Chef 13,但在生产中安装Chef 12。通过将其添加到您的
.kitchen.yml
(更新现有的provisioner部分,如果它已经存在):
我想最近也为Chef 13更新了users
cookbook,因此,如果您确实想为了升级而继续测试它,请检查是否有什么东西阻止了升级
provisioner:
name: whatever_you_have
require_chef_omnibus: 12