Deployment 在资源上执行操作“创建”时出错的Chef appbox';用户帐户[部署]和#x27;

Deployment 在资源上执行操作“创建”时出错的Chef appbox';用户帐户[部署]和#x27;,deployment,chef-infra,vagrant,knife,Deployment,Chef Infra,Vagrant,Knife,我在Ubuntu12.04的《流浪者》中测试厨师。我使用默认的流浪账户vagrant来运行引导vagrant@192.168.33.10每次显示以下错误时: ================================================================================ Error executing action `create` on resource 'user_account[deploy]' =======================

我在Ubuntu12.04的《流浪者》中测试厨师。我使用默认的流浪账户
vagrant
来运行
引导vagrant@192.168.33.10
每次显示以下错误时:

================================================================================
Error executing action `create` on resource 'user_account[deploy]'
================================================================================


Mixlib::ShellOut::ShellCommandFailed
------------------------------------
user[deploy] (/home/vagrant/chef-solo/cookbooks-2/user/providers/account.rb line 94) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '6'
---- Begin output of ["useradd", "-c", "deployer", "-g", "deploy", "-s", "/bin/bash", "-u", "9001", "-d", "/home/deploy", "-m", "deploy"] ----
STDOUT: 
STDERR: useradd: group 'deploy' does not exist
---- End output of ["useradd", "-c", "deployer", "-g", "deploy", "-s", "/bin/bash", "-u", "9001", "-d", "/home/deploy", "-m", "deploy"] ----
Ran ["useradd", "-c", "deployer", "-g", "deploy", "-s", "/bin/bash", "-u", "9001", "-d", "/home/deploy", "-m", "deploy"] returned 6
这让我非常失望。希望有人能帮助我

这是我的节点配置文件(/nodes/vagrant.json):


如果你能提供你的食谱的代码,这将是很有帮助的。然而,错误信息非常清楚

---- Begin output of ["useradd", "-c", "deployer", "-g", "deploy", "-s", "/bin/bash", "-u", "9001", "-d", "/home/deploy", "-m", "deploy"] ----
从这一行,我们知道chef试图执行以下命令来创建一个用户,即
deploy
组中的
deploy

useradd -c deployer -g deploy -s /bin/bash -u 9001 -d /home/deploy -m deploy
然后,错误消息是:

STDERR: useradd: group 'deploy' does not exist

解决方案应该很简单:在创建此用户之前创建一个
deploy
组。您可以使用内置资源来执行此操作

是的,但我使用的是
机架框
数据框
,应该在没有任何配置的情况下运行。我更新了我的问题并包含了节点配置文件。@A简单地说,添加节点属性不会改变您在创建用户之前需要创建缺少的“部署”组的事实。您需要查看厨师配方代码。
STDERR: useradd: group 'deploy' does not exist